[kernel/2.6.38] fix gcc-4.6 set but unused warnings
[openwrt.git] / target / linux / omap24xx / patches-3.1 / 850-musb-tusb-modular-fixes.patch
1 --- a/drivers/usb/musb/tusb6010.c
2 +++ b/drivers/usb/musb/tusb6010.c
3 @@ -56,6 +56,7 @@ u8 tusb_get_revision(struct musb *musb)
4
5 return rev;
6 }
7 +EXPORT_SYMBOL(tusb_get_revision);
8
9 static int tusb_print_revision(struct musb *musb)
10 {
11 @@ -220,6 +221,7 @@ void musb_write_fifo(struct musb_hw_ep *
12 if (len > 0)
13 tusb_fifo_write_unaligned(fifo, buf, len);
14 }
15 +EXPORT_SYMBOL(musb_write_fifo);
16
17 void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *buf)
18 {
19 @@ -267,6 +269,7 @@ void musb_read_fifo(struct musb_hw_ep *h
20 if (len > 0)
21 tusb_fifo_read_unaligned(fifo, buf, len);
22 }
23 +EXPORT_SYMBOL(musb_read_fifo);
24
25 static struct musb *the_musb;
26
27 @@ -1244,18 +1247,18 @@ static struct platform_driver tusb_drive
28 },
29 };
30
31 -MODULE_DESCRIPTION("TUSB6010 MUSB Glue Layer");
32 -MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
33 -MODULE_LICENSE("GPL v2");
34 +//MODULE_DESCRIPTION("TUSB6010 MUSB Glue Layer");
35 +//MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
36 +//MODULE_LICENSE("GPL v2");
37
38 -static int __init tusb_init(void)
39 +int musb_hdrc_glue_init(void)
40 {
41 return platform_driver_probe(&tusb_driver, tusb_probe);
42 }
43 -subsys_initcall(tusb_init);
44 +EXPORT_SYMBOL(musb_hdrc_glue_init);
45
46 -static void __exit tusb_exit(void)
47 +void musb_hdrc_glue_exit(void)
48 {
49 platform_driver_unregister(&tusb_driver);
50 }
51 -module_exit(tusb_exit);
52 +EXPORT_SYMBOL(musb_hdrc_glue_exit);
53 --- a/drivers/usb/musb/musb_core.c
54 +++ b/drivers/usb/musb/musb_core.c
55 @@ -207,7 +207,7 @@ static struct otg_io_access_ops musb_ulp
56
57 /*-------------------------------------------------------------------------*/
58
59 -#if !defined(CONFIG_USB_MUSB_TUSB6010) && !defined(CONFIG_USB_MUSB_BLACKFIN)
60 +#if !defined(CONFIG_USB_MUSB_TUSB6010) && !defined(CONFIG_USB_MUSB_TUSB6010_MODULE) && !defined(CONFIG_USB_MUSB_BLACKFIN)
61
62 /*
63 * Load an endpoint's FIFO
64 @@ -250,7 +250,7 @@ void musb_write_fifo(struct musb_hw_ep *
65 }
66 }
67
68 -#if !defined(CONFIG_USB_MUSB_AM35X)
69 +#if !defined(CONFIG_USB_MUSB_AM35X) && !defined(CONFIG_USB_MUSB_TUSB6010) && !defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
70 /*
71 * Unload an endpoint's FIFO
72 */
73 @@ -1432,7 +1432,7 @@ static int __init musb_core_init(u16 mus
74 struct musb_hw_ep *hw_ep = musb->endpoints + i;
75
76 hw_ep->fifo = MUSB_FIFO_OFFSET(i) + mbase;
77 -#ifdef CONFIG_USB_MUSB_TUSB6010
78 +#if defined(CONFIG_USB_MUSB_TUSB6010) || defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
79 hw_ep->fifo_async = musb->async + 0x400 + MUSB_FIFO_OFFSET(i);
80 hw_ep->fifo_sync = musb->sync + 0x400 + MUSB_FIFO_OFFSET(i);
81 hw_ep->fifo_sync_va =
82 @@ -2368,8 +2368,13 @@ static struct platform_driver musb_drive
83
84 /*-------------------------------------------------------------------------*/
85
86 +extern int musb_hdrc_glue_init(void);
87 +extern void musb_hdrc_glue_exit(void);
88 +
89 static int __init musb_init(void)
90 {
91 + int err;
92 +
93 if (usb_disabled())
94 return 0;
95
96 @@ -2378,7 +2383,17 @@ static int __init musb_init(void)
97 ", "
98 "otg (peripheral+host)",
99 musb_driver_name);
100 - return platform_driver_probe(&musb_driver, musb_probe);
101 +
102 + err = musb_hdrc_glue_init();
103 + if (err)
104 + return err;
105 + err = platform_driver_probe(&musb_driver, musb_probe);
106 + if (err) {
107 + musb_hdrc_glue_exit();
108 + return err;
109 + }
110 +
111 + return 0;
112 }
113
114 /* make us init after usbcore and i2c (transceivers, regulators, etc)
115 @@ -2389,5 +2404,6 @@ fs_initcall(musb_init);
116 static void __exit musb_cleanup(void)
117 {
118 platform_driver_unregister(&musb_driver);
119 + musb_hdrc_glue_exit();
120 }
121 module_exit(musb_cleanup);
122 --- a/drivers/usb/Makefile
123 +++ b/drivers/usb/Makefile
124 @@ -47,7 +47,7 @@ obj-$(CONFIG_EARLY_PRINTK_DBGP) += early
125 obj-$(CONFIG_USB_ATM) += atm/
126 obj-$(CONFIG_USB_SPEEDTOUCH) += atm/
127
128 -obj-$(CONFIG_USB_MUSB_HDRC) += musb/
129 +obj-y += musb/
130 obj-$(CONFIG_USB_RENESAS_USBHS) += renesas_usbhs/
131 obj-$(CONFIG_USB_OTG_UTILS) += otg/
132 obj-$(CONFIG_USB_GADGET) += gadget/
133 --- a/drivers/usb/musb/Makefile
134 +++ b/drivers/usb/musb/Makefile
135 @@ -13,7 +13,7 @@ musb_hdrc-$(CONFIG_DEBUG_FS) += musb_d
136 # Hardware Glue Layer
137 obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
138 obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o
139 -obj-$(CONFIG_USB_MUSB_TUSB6010) += tusb6010.o
140 +musb_hdrc-$(subst m,y,$(CONFIG_USB_MUSB_TUSB6010)) += tusb6010.o
141 obj-$(CONFIG_USB_MUSB_DAVINCI) += davinci.o
142 obj-$(CONFIG_USB_MUSB_DA8XX) += da8xx.o
143 obj-$(CONFIG_USB_MUSB_BLACKFIN) += blackfin.o
This page took 0.043768 seconds and 5 git commands to generate.