From a353678d3136306c1d00f0d2319de1dac8a6b1db Mon Sep 17 00:00:00 2001 From: David Brownell Date: Thu, 6 Jul 2006 15:48:53 -0700 Subject: [PATCH] USB: gadget section fixups Recent section changes broke gadget builds on some platforms. This patch is the best fix that's available until better section markings exist: - There's a lot of cleanup code that gets used in both init and exit paths; stop marking it as "__exit". (Best fix for this would be an "__init_or_exit" section marking, putting the cleanup in __init when __exit sections get discarded else in __exit.) - Stop marking the use-once probe routines as "__init" since references to those routines are not allowed from driver structures. They're now marked "__devinit", which in practice is a net lose. (Best fix for this is likely to separate such use-once probe routines from the driver structure ... but in general, all busses that aren't hotpluggable will be forced to waste memory for all probe-only code.) In general these broken section rules waste an average of two to four kBytes per driver of code bloat ... because none of the relevant code can ever be reused after module initialization. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/rndis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb/gadget/rndis.c') diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 354670d12308..408c3380d602 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c @@ -1398,7 +1398,7 @@ static struct proc_dir_entry *rndis_connect_state [RNDIS_MAX_CONFIGS]; #endif /* CONFIG_USB_GADGET_DEBUG_FILES */ -int __init rndis_init (void) +int __devinit rndis_init (void) { u8 i; -- cgit v1.2.3