]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] USB: gadget section fixups
authorDavid Brownell <david-b@pacbell.net>
Thu, 6 Jul 2006 22:48:53 +0000 (15:48 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 12 Jul 2006 23:03:24 +0000 (16:03 -0700)
commit44b35d25d11ce3fafd9ddc9c43242dc79c1a978b
treeee68e60ab3611053ba91aedd74e673337601760d
parent7c368d5afdb3480ab213f89b93aa23fdcd26d459
[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 <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/epautoconf.c
drivers/usb/gadget/ether.c
drivers/usb/gadget/file_storage.c
drivers/usb/gadget/rndis.c
drivers/usb/gadget/rndis.h
drivers/usb/gadget/serial.c
drivers/usb/gadget/zero.c
include/linux/usb_gadget.h