usb: musb: allow building USB_MUSB_TUSB6010 as a module
authorArnd Bergmann <arnd@arndb.de>
Sun, 2 Oct 2011 14:45:47 +0000 (16:45 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 Dec 2011 09:51:42 +0000 (11:51 +0200)
Commit 1376d92f9 "usb: musb: allow musb and glue layers to be modules"
made the USB_MUSB_TUSB6010 option modular, but actually building
the driver as a module does not work, so various randconfig builds
actually fail. This changes all code that depends on the
option to also check for modular builds, and exports the necessary
symbols.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
arch/arm/mach-omap2/board-n8x0.c
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_io.h
drivers/usb/musb/tusb6010.c

index e9d5f4a3d0642dd0b553da23987136e9864e3d70..29136929ddbbb5bbc3a8719f880a370c72630891 100644 (file)
@@ -46,7 +46,7 @@ static struct device *mmc_device;
 #define TUSB6010_GPIO_ENABLE   0
 #define TUSB6010_DMACHAN       0x3f
 
-#ifdef CONFIG_USB_MUSB_TUSB6010
+#if defined(CONFIG_USB_MUSB_TUSB6010) || defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
 /*
  * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and
  * 1.5 V voltage regulators of PM companion chip. Companion chip will then
index 2141976d423cabea5ef8ed99934e93fc4df74e99..90b9da1428b4975c4a157ea92abe47d2c6277611 100644 (file)
@@ -1432,7 +1432,7 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
                struct musb_hw_ep       *hw_ep = musb->endpoints + i;
 
                hw_ep->fifo = MUSB_FIFO_OFFSET(i) + mbase;
-#ifdef CONFIG_USB_MUSB_TUSB6010
+#if defined(CONFIG_USB_MUSB_TUSB6010) || defined (CONFIG_USB_MUSB_TUSB6010_MODULE)
                hw_ep->fifo_async = musb->async + 0x400 + MUSB_FIFO_OFFSET(i);
                hw_ep->fifo_sync = musb->sync + 0x400 + MUSB_FIFO_OFFSET(i);
                hw_ep->fifo_sync_va =
@@ -1631,6 +1631,7 @@ void musb_dma_completion(struct musb *musb, u8 epnum, u8 transmit)
                }
        }
 }
+EXPORT_SYMBOL_GPL(musb_dma_completion);
 
 #else
 #define use_dma                        0
index 03c6ccdbb3be14470dbe5e87b12d953f0b69b6a9..e61aa95f2d2aa0a1c1b4818dc8b41f62239a6aa4 100644 (file)
@@ -74,7 +74,7 @@ static inline void musb_writel(void __iomem *addr, unsigned offset, u32 data)
        { __raw_writel(data, addr + offset); }
 
 
-#ifdef CONFIG_USB_MUSB_TUSB6010
+#if defined(CONFIG_USB_MUSB_TUSB6010) || defined (CONFIG_USB_MUSB_TUSB6010_MODULE)
 
 /*
  * TUSB6010 doesn't allow 8-bit access; 16-bit access is the minimum.
index ec1480191f78752a1ff16b09566f3f4d2d6512b1..1f405616e6cd96f1f1d6df0ccca048a10a76ae93 100644 (file)
@@ -56,6 +56,7 @@ u8 tusb_get_revision(struct musb *musb)
 
        return rev;
 }
+EXPORT_SYMBOL_GPL(tusb_get_revision);
 
 static int tusb_print_revision(struct musb *musb)
 {
This page took 0.039812 seconds and 5 git commands to generate.