aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp/devices.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-03-12 10:29:22 -0400
committerArnd Bergmann <arnd@arndb.de>2014-03-18 11:03:44 -0400
commit3524080826c289df0efd5159282f6c4aeacf0c11 (patch)
treef532fcd500b7d5b347183714b5612128b404009c /arch/arm/mach-mmp/devices.c
parentbfdad565ae0a61ac943974b8ae61ec0ed55ceb04 (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.c14
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,
72 return platform_device_add(pdev); 72 return platform_device_add(pdev);
73} 73}
74 74
75#if defined(CONFIG_USB) || defined(CONFIG_USB_GADGET) 75#if IS_ENABLED(CONFIG_USB) || IS_ENABLED(CONFIG_USB_GADGET)
76 76
77/***************************************************************************** 77/*****************************************************************************
78 * The registers read/write routines 78 * The registers read/write routines
@@ -112,9 +112,9 @@ static void u2o_write(void __iomem *base, unsigned int offset,
112 readl_relaxed(base + offset); 112 readl_relaxed(base + offset);
113} 113}
114 114
115#if defined(CONFIG_USB_MV_UDC) || defined(CONFIG_USB_EHCI_MV) 115#if IS_ENABLED(CONFIG_USB_MV_UDC) || IS_ENABLED(CONFIG_USB_EHCI_MV)
116 116
117#if defined(CONFIG_CPU_PXA910) || defined(CONFIG_CPU_PXA168) 117#if IS_ENABLED(CONFIG_CPU_PXA910) || IS_ENABLED(CONFIG_CPU_PXA168)
118 118
119static DEFINE_MUTEX(phy_lock); 119static DEFINE_MUTEX(phy_lock);
120static int phy_init_cnt; 120static int phy_init_cnt;
@@ -238,10 +238,10 @@ void pxa_usb_phy_deinit(void __iomem *phy_reg)
238#endif 238#endif
239#endif 239#endif
240 240
241#ifdef CONFIG_USB_SUPPORT 241#if IS_ENABLED(CONFIG_USB_SUPPORT)
242static u64 usb_dma_mask = ~(u32)0; 242static u64 usb_dma_mask = ~(u32)0;
243 243
244#ifdef CONFIG_USB_MV_UDC 244#if IS_ENABLED(CONFIG_USB_MV_UDC)
245struct resource pxa168_u2o_resources[] = { 245struct resource pxa168_u2o_resources[] = {
246 /* regbase */ 246 /* regbase */
247 [0] = { 247 [0] = {
@@ -276,7 +276,7 @@ struct platform_device pxa168_device_u2o = {
276}; 276};
277#endif /* CONFIG_USB_MV_UDC */ 277#endif /* CONFIG_USB_MV_UDC */
278 278
279#ifdef CONFIG_USB_EHCI_MV_U2O 279#if IS_ENABLED(CONFIG_USB_EHCI_MV_U2O)
280struct resource pxa168_u2oehci_resources[] = { 280struct resource pxa168_u2oehci_resources[] = {
281 /* regbase */ 281 /* regbase */
282 [0] = { 282 [0] = {
@@ -312,7 +312,7 @@ struct platform_device pxa168_device_u2oehci = {
312}; 312};
313#endif 313#endif
314 314
315#if defined(CONFIG_USB_MV_OTG) 315#if IS_ENABLED(CONFIG_USB_MV_OTG)
316struct resource pxa168_u2ootg_resources[] = { 316struct resource pxa168_u2ootg_resources[] = {
317 /* regbase */ 317 /* regbase */
318 [0] = { 318 [0] = {