From patchwork Mon Apr 1 20:03:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 2372641 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 3F322DFB7B for ; Mon, 1 Apr 2013 20:03:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759074Ab3DAUDV (ORCPT ); Mon, 1 Apr 2013 16:03:21 -0400 Received: from filtteri6.pp.htv.fi ([213.243.153.189]:48402 "EHLO filtteri6.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759025Ab3DAUDV (ORCPT ); Mon, 1 Apr 2013 16:03:21 -0400 Received: from localhost (localhost [127.0.0.1]) by filtteri6.pp.htv.fi (Postfix) with ESMTP id 77ED156F0DF; Mon, 1 Apr 2013 23:03:19 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp5.welho.com ([213.243.153.39]) by localhost (filtteri6.pp.htv.fi [213.243.153.189]) (amavisd-new, port 10024) with ESMTP id ww4xGeI29YFE; Mon, 1 Apr 2013 23:03:17 +0300 (EEST) Received: from blackmetal.pp.htv.fi (cs181064211.pp.htv.fi [82.181.64.211]) by smtp5.welho.com (Postfix) with ESMTP id 838FB5BC004; Mon, 1 Apr 2013 23:03:17 +0300 (EEST) From: Aaro Koskinen To: Tony Lindgren , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Cc: Felipe Balbi , Aaro Koskinen Subject: [PATCH v2 RESEND] ARM: OMAP1: fix omap_udc registration Date: Mon, 1 Apr 2013 23:03:00 +0300 Message-Id: <1364846580-5256-1-git-send-email-aaro.koskinen@iki.fi> X-Mailer: git-send-email 1.7.10.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org omap_udc platform device is not registered properly anymore: CONFIG_USB_GADGET_OMAP was deleted by 193ab2a6 (usb: gadget: allow multiple gadgets to be built) already in v3.1. Fix by using CONFIG_USB_OMAP instead. Tested on Nokia 770 by checking that omap_udc is probed & working properly when built as a module. Acked-by: Felipe Balbi Signed-off-by: Aaro Koskinen --- Patch history: v2: http://marc.info/?t=136266319800006&r=1&w=2 - use IS_ENABLED() v1: http://marc.info/?t=136260886600006&r=1&w=2 arch/arm/mach-omap1/include/mach/usb.h | 2 +- arch/arm/mach-omap1/usb.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap1/include/mach/usb.h b/arch/arm/mach-omap1/include/mach/usb.h index 753cd5c..45e5ac7 100644 --- a/arch/arm/mach-omap1/include/mach/usb.h +++ b/arch/arm/mach-omap1/include/mach/usb.h @@ -2,7 +2,7 @@ * FIXME correct answer depends on hmc_mode, * as does (on omap1) any nonzero value for config->otg port number */ -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED(CONFIG_USB_OMAP) #define is_usb0_device(config) 1 #else #define is_usb0_device(config) 0 diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index 1a1db59..4118db5 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c @@ -123,7 +123,7 @@ omap_otg_init(struct omap_usb_config *config) syscon = omap_readl(OTG_SYSCON_1); syscon |= HST_IDLE_EN|DEV_IDLE_EN|OTG_IDLE_EN; -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED(CONFIG_USB_OMAP) if (config->otg || config->register_dev) { struct platform_device *udc_device = config->udc_device; int status; @@ -169,7 +169,7 @@ omap_otg_init(struct omap_usb_config *config) void omap_otg_init(struct omap_usb_config *config) {} #endif -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED(CONFIG_USB_OMAP) static struct resource udc_resources[] = { /* order is significant! */ @@ -600,7 +600,7 @@ static void __init omap_1510_usb_init(struct omap_usb_config *config) while (!(omap_readw(ULPD_DPLL_CTRL) & DPLL_LOCK)) cpu_relax(); -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED(CONFIG_USB_OMAP) if (config->register_dev) { int status;