diff options
author | Arnd Bergmann <arnd@arndb.de> | 2014-03-12 15:29:22 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2014-03-18 16:03:44 +0100 |
commit | 3524080826c289df0efd5159282f6c4aeacf0c11 (patch) | |
tree | f532fcd500b7d5b347183714b5612128b404009c /arch/arm/mach-mmp/devices.c | |
parent | bfdad565ae0a61ac943974b8ae61ec0ed55ceb04 (diff) |
ARM: mmp: allow platform devices with modular USB
The USB host drivers need platform data to be defined on
pxa168 and pxa910, but the conditionals used in the devices.c
file only work if the drivers are built-in. This patch
fixes the definition by changing the #ifdef to #if IS_ENABLED(),
which works both for built-in and modular Kconfig symbols.
I found one specific problem using 'randconfig' builds, but
for consistency, this patch uses IS_ENABLED() for all Kconfig
symbols in these three files.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Diffstat (limited to 'arch/arm/mach-mmp/devices.c')
-rw-r--r-- | arch/arm/mach-mmp/devices.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c index dd2d8b103cc8..2bcb766af05d 100644 --- a/arch/arm/mach-mmp/devices.c +++ b/arch/arm/mach-mmp/devices.c @@ -72,7 +72,7 @@ int __init pxa_register_device(struct pxa_device_desc *desc, return platform_device_add(pdev); } -#if defined(CONFIG_USB) || defined(CONFIG_USB_GADGET) +#if IS_ENABLED(CONFIG_USB) || IS_ENABLED(CONFIG_USB_GADGET) /***************************************************************************** * The registers read/write routines @@ -112,9 +112,9 @@ static void u2o_write(void __iomem *base, unsigned int offset, readl_relaxed(base + offset); } -#if defined(CONFIG_USB_MV_UDC) || defined(CONFIG_USB_EHCI_MV) +#if IS_ENABLED(CONFIG_USB_MV_UDC) || IS_ENABLED(CONFIG_USB_EHCI_MV) -#if defined(CONFIG_CPU_PXA910) || defined(CONFIG_CPU_PXA168) +#if IS_ENABLED(CONFIG_CPU_PXA910) || IS_ENABLED(CONFIG_CPU_PXA168) static DEFINE_MUTEX(phy_lock); static int phy_init_cnt; @@ -238,10 +238,10 @@ void pxa_usb_phy_deinit(void __iomem *phy_reg) #endif #endif -#ifdef CONFIG_USB_SUPPORT +#if IS_ENABLED(CONFIG_USB_SUPPORT) static u64 usb_dma_mask = ~(u32)0; -#ifdef CONFIG_USB_MV_UDC +#if IS_ENABLED(CONFIG_USB_MV_UDC) struct resource pxa168_u2o_resources[] = { /* regbase */ [0] = { @@ -276,7 +276,7 @@ struct platform_device pxa168_device_u2o = { }; #endif /* CONFIG_USB_MV_UDC */ -#ifdef CONFIG_USB_EHCI_MV_U2O +#if IS_ENABLED(CONFIG_USB_EHCI_MV_U2O) struct resource pxa168_u2oehci_resources[] = { /* regbase */ [0] = { @@ -312,7 +312,7 @@ struct platform_device pxa168_device_u2oehci = { }; #endif -#if defined(CONFIG_USB_MV_OTG) +#if IS_ENABLED(CONFIG_USB_MV_OTG) struct resource pxa168_u2ootg_resources[] = { /* regbase */ [0] = { |