From 121e1a73a6246df206e779cc163ce95fbd300877 Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Thu, 10 May 2012 16:27:23 -0600 Subject: ARM: OMAP1: USB: fix ocpi_enable compile problem on non-1610 builds Janusz Krzysztofik reported the following build break on OMAP1 builds that don't include CONFIG_ARCH_OMAP16XX: LD .tmp_vmlinux1 arch/arm/mach-omap1/built-in.o: In function `omap1_usb_init': lcd_dma.c:(.init.text+0x1420): undefined reference to `ocpi_enable' make: *** [.tmp_vmlinux1] Error 1 This was caused by commit d3645d39ad0ed9f09535065676ea0ba114f93cdf ("ARM: OMAP1: OHCI: use platform_data fn ptr to enable OCPI bus"). Fix by declaring an empty ocpi_enable() on non-16XX builds, which should work until the OCPI code is moved out to drivers/. Cc: Janusz Krzysztofik Signed-off-by: Paul Walmsley Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h index 8cc616e..bb7779b 100644 --- a/arch/arm/mach-omap1/common.h +++ b/arch/arm/mach-omap1/common.h @@ -67,6 +67,10 @@ extern bool omap_32k_timer_init(void); extern u32 omap_irq_flags; +#ifdef CONFIG_ARCH_OMAP16XX extern int ocpi_enable(void); +#else +static inline int ocpi_enable(void) { return 0; } +#endif #endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */ -- cgit v0.10.2 From 19b08b33fa4c60d66d4e341d4d1d9a6e86ffc9e6 Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Wed, 9 May 2012 16:38:02 -0600 Subject: ARM: OMAP: OTG integration: fix compiler warning Tony reported the following compile warning after commit eeb3711b89d68e147e05e7b43a49ecc5009dc157 ("ARM: OMAP2+: clean up some cppcheck warnings"): arch/arm/plat-omap/usb.c: In function 'omap_otg_init': arch/arm/plat-omap/usb.c:40: warning: unused variable 'status' This happens if CONFIG_ARCH_OMAP_OTG is set but CONFIG_USB_GADGET_OMAP, CONFIG_USB_OHCI_HCD, CONFIG_USB_OHCI_HCD_MODULE, and CONFIG_USB_OTG are all unset. Fix by localizing the status variable to the blocks that use it. Compile-tested only, with omap2plus_defconfig and omap2plus_defconfig with CONFIG_USB_OHCI_HCD and CONFIG_USB_OTG enabled. Signed-off-by: Paul Walmsley Signed-off-by: Tony Lindgren diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c index 5db7561..daa0327 100644 --- a/arch/arm/plat-omap/usb.c +++ b/arch/arm/plat-omap/usb.c @@ -37,7 +37,6 @@ void __init omap_otg_init(struct omap_usb_config *config) { u32 syscon; - int status; int alt_pingroup = 0; /* NOTE: no bus or clock setup (yet?) */ @@ -102,6 +101,7 @@ omap_otg_init(struct omap_usb_config *config) #ifdef CONFIG_USB_GADGET_OMAP if (config->otg || config->register_dev) { struct platform_device *udc_device = config->udc_device; + int status; syscon &= ~DEV_IDLE_EN; udc_device->dev.platform_data = config; @@ -114,6 +114,7 @@ omap_otg_init(struct omap_usb_config *config) #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) if (config->otg || config->register_host) { struct platform_device *ohci_device = config->ohci_device; + int status; syscon &= ~HST_IDLE_EN; ohci_device->dev.platform_data = config; @@ -126,6 +127,7 @@ omap_otg_init(struct omap_usb_config *config) #ifdef CONFIG_USB_OTG if (config->otg) { struct platform_device *otg_device = config->otg_device; + int status; syscon &= ~OTG_IDLE_EN; otg_device->dev.platform_data = config; -- cgit v0.10.2