aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2008-04-05 17:17:14 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:48 -0400
commit0e530b45783f75a29bde20bbf9e287c915a4f68b (patch)
treec32b0677126225b5b2df3e88ccdc86dc376a58c7
parent61a5c657892a43653d6189972159590751a0673e (diff)
USB: gadget section fixes
Restore some section annotations: they were switched to "__devinit" while they should have been "__init", because of bogus warnings. The warnings are now fixed, so the runtime footprint of various drivers can now shrink a bit. On ARMv5, it's about 600 bytes except for the Ethernet gadget, where it can save a bit more. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/gadget/epautoconf.c12
-rw-r--r--drivers/usb/gadget/ether.c6
-rw-r--r--drivers/usb/gadget/gmidi.c2
-rw-r--r--drivers/usb/gadget/rndis.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
index f9d07108bc30..8bdad221fa91 100644
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -34,12 +34,12 @@
34 34
35 35
36/* we must assign addresses for configurable endpoints (like net2280) */ 36/* we must assign addresses for configurable endpoints (like net2280) */
37static __devinitdata unsigned epnum; 37static __initdata unsigned epnum;
38 38
39// #define MANY_ENDPOINTS 39// #define MANY_ENDPOINTS
40#ifdef MANY_ENDPOINTS 40#ifdef MANY_ENDPOINTS
41/* more than 15 configurable endpoints */ 41/* more than 15 configurable endpoints */
42static __devinitdata unsigned in_epnum; 42static __initdata unsigned in_epnum;
43#endif 43#endif
44 44
45 45
@@ -59,7 +59,7 @@ static __devinitdata unsigned in_epnum;
59 * NOTE: each endpoint is unidirectional, as specified by its USB 59 * NOTE: each endpoint is unidirectional, as specified by its USB
60 * descriptor; and isn't specific to a configuration or altsetting. 60 * descriptor; and isn't specific to a configuration or altsetting.
61 */ 61 */
62static int __devinit 62static int __init
63ep_matches ( 63ep_matches (
64 struct usb_gadget *gadget, 64 struct usb_gadget *gadget,
65 struct usb_ep *ep, 65 struct usb_ep *ep,
@@ -186,7 +186,7 @@ ep_matches (
186 return 1; 186 return 1;
187} 187}
188 188
189static struct usb_ep * __devinit 189static struct usb_ep * __init
190find_ep (struct usb_gadget *gadget, const char *name) 190find_ep (struct usb_gadget *gadget, const char *name)
191{ 191{
192 struct usb_ep *ep; 192 struct usb_ep *ep;
@@ -228,7 +228,7 @@ find_ep (struct usb_gadget *gadget, const char *name)
228 * 228 *
229 * On failure, this returns a null endpoint descriptor. 229 * On failure, this returns a null endpoint descriptor.
230 */ 230 */
231struct usb_ep * __devinit usb_ep_autoconfig ( 231struct usb_ep * __init usb_ep_autoconfig (
232 struct usb_gadget *gadget, 232 struct usb_gadget *gadget,
233 struct usb_endpoint_descriptor *desc 233 struct usb_endpoint_descriptor *desc
234) 234)
@@ -295,7 +295,7 @@ struct usb_ep * __devinit usb_ep_autoconfig (
295 * state such as ep->driver_data and the record of assigned endpoints 295 * state such as ep->driver_data and the record of assigned endpoints
296 * used by usb_ep_autoconfig(). 296 * used by usb_ep_autoconfig().
297 */ 297 */
298void __devinit usb_ep_autoconfig_reset (struct usb_gadget *gadget) 298void __init usb_ep_autoconfig_reset (struct usb_gadget *gadget)
299{ 299{
300 struct usb_ep *ep; 300 struct usb_ep *ep;
301 301
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index e99872308144..92b9bf78071f 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -2229,7 +2229,7 @@ eth_unbind (struct usb_gadget *gadget)
2229 set_gadget_data (gadget, NULL); 2229 set_gadget_data (gadget, NULL);
2230} 2230}
2231 2231
2232static u8 __devinit nibble (unsigned char c) 2232static u8 __init nibble (unsigned char c)
2233{ 2233{
2234 if (likely (isdigit (c))) 2234 if (likely (isdigit (c)))
2235 return c - '0'; 2235 return c - '0';
@@ -2239,7 +2239,7 @@ static u8 __devinit nibble (unsigned char c)
2239 return 0; 2239 return 0;
2240} 2240}
2241 2241
2242static int __devinit get_ether_addr(const char *str, u8 *dev_addr) 2242static int __init get_ether_addr(const char *str, u8 *dev_addr)
2243{ 2243{
2244 if (str) { 2244 if (str) {
2245 unsigned i; 2245 unsigned i;
@@ -2260,7 +2260,7 @@ static int __devinit get_ether_addr(const char *str, u8 *dev_addr)
2260 return 1; 2260 return 1;
2261} 2261}
2262 2262
2263static int __devinit 2263static int __init
2264eth_bind (struct usb_gadget *gadget) 2264eth_bind (struct usb_gadget *gadget)
2265{ 2265{
2266 struct eth_dev *dev; 2266 struct eth_dev *dev;
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c
index 5b42ccd0035f..ff3a8513e64d 100644
--- a/drivers/usb/gadget/gmidi.c
+++ b/drivers/usb/gadget/gmidi.c
@@ -1149,7 +1149,7 @@ fail:
1149/* 1149/*
1150 * Creates an output endpoint, and initializes output ports. 1150 * Creates an output endpoint, and initializes output ports.
1151 */ 1151 */
1152static int __devinit gmidi_bind(struct usb_gadget *gadget) 1152static int __init gmidi_bind(struct usb_gadget *gadget)
1153{ 1153{
1154 struct gmidi_device *dev; 1154 struct gmidi_device *dev;
1155 struct usb_ep *in_ep, *out_ep; 1155 struct usb_ep *in_ep, *out_ep;
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index 3d036647431f..934911ee5c72 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -1403,7 +1403,7 @@ static struct proc_dir_entry *rndis_connect_state [RNDIS_MAX_CONFIGS];
1403#endif /* CONFIG_USB_GADGET_DEBUG_FILES */ 1403#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
1404 1404
1405 1405
1406int __devinit rndis_init (void) 1406int __init rndis_init (void)
1407{ 1407{
1408 u8 i; 1408 u8 i;
1409 1409