From: David Brownell Date: Sat, 5 Apr 2008 21:17:14 +0000 (-0700) Subject: USB: gadget section fixes X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0e530b45783f75a29bde20bbf9e287c915a4f68b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- 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 @@ /* we must assign addresses for configurable endpoints (like net2280) */ -static __devinitdata unsigned epnum; +static __initdata unsigned epnum; // #define MANY_ENDPOINTS #ifdef MANY_ENDPOINTS /* more than 15 configurable endpoints */ -static __devinitdata unsigned in_epnum; +static __initdata unsigned in_epnum; #endif @@ -59,7 +59,7 @@ static __devinitdata unsigned in_epnum; * NOTE: each endpoint is unidirectional, as specified by its USB * descriptor; and isn't specific to a configuration or altsetting. */ -static int __devinit +static int __init ep_matches ( struct usb_gadget *gadget, struct usb_ep *ep, @@ -186,7 +186,7 @@ ep_matches ( return 1; } -static struct usb_ep * __devinit +static struct usb_ep * __init find_ep (struct usb_gadget *gadget, const char *name) { struct usb_ep *ep; @@ -228,7 +228,7 @@ find_ep (struct usb_gadget *gadget, const char *name) * * On failure, this returns a null endpoint descriptor. */ -struct usb_ep * __devinit usb_ep_autoconfig ( +struct usb_ep * __init usb_ep_autoconfig ( struct usb_gadget *gadget, struct usb_endpoint_descriptor *desc ) @@ -295,7 +295,7 @@ struct usb_ep * __devinit usb_ep_autoconfig ( * state such as ep->driver_data and the record of assigned endpoints * used by usb_ep_autoconfig(). */ -void __devinit usb_ep_autoconfig_reset (struct usb_gadget *gadget) +void __init usb_ep_autoconfig_reset (struct usb_gadget *gadget) { struct usb_ep *ep; 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) set_gadget_data (gadget, NULL); } -static u8 __devinit nibble (unsigned char c) +static u8 __init nibble (unsigned char c) { if (likely (isdigit (c))) return c - '0'; @@ -2239,7 +2239,7 @@ static u8 __devinit nibble (unsigned char c) return 0; } -static int __devinit get_ether_addr(const char *str, u8 *dev_addr) +static int __init get_ether_addr(const char *str, u8 *dev_addr) { if (str) { unsigned i; @@ -2260,7 +2260,7 @@ static int __devinit get_ether_addr(const char *str, u8 *dev_addr) return 1; } -static int __devinit +static int __init eth_bind (struct usb_gadget *gadget) { 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: /* * Creates an output endpoint, and initializes output ports. */ -static int __devinit gmidi_bind(struct usb_gadget *gadget) +static int __init gmidi_bind(struct usb_gadget *gadget) { struct gmidi_device *dev; 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]; #endif /* CONFIG_USB_GADGET_DEBUG_FILES */ -int __devinit rndis_init (void) +int __init rndis_init (void) { u8 i;