OpenCloudOS-Kernel/drivers/usb/gadget/legacy
Arnd Bergmann c94e289f19 usb: gadget: remove incorrect __init/__exit annotations
A recent change introduced a link error for the composite
printer gadget driver:

`printer_unbind' referenced in section `.ref.data' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o

Evidently the unbind function should not be marked __exit here,
because it is called through a callback pointer that is not necessarily
discarded, __composite_unbind() is indeed called from the error path of
composite_bind(), which can never work for a built-in driver.

Looking at the surrounding code, I found the same problem in all other
composite gadget drivers in both the bind and unbind functions, as
well as the udc platform driver 'remove' functions. Those will break
if anyone uses the 'unbind' sysfs attribute to detach a device from a
built-in driver.

This patch removes the incorrect annotations from all the gadget
drivers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-27 14:45:35 -05:00
..
Kconfig usb: gadget: printer: convert to new interface of f_printer 2015-03-10 15:33:40 -05:00
Makefile usb: gadget: webcam: convert webcam to new interface of f_uvc 2014-09-09 09:49:31 -05:00
acm_ms.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
audio.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
cdc2.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
dbgp.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
ether.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
g_ffs.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
gmidi.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
hid.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
inode.c VFS: assorted weird filesystems: d_inode() annotations 2015-04-15 15:06:58 -04:00
mass_storage.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
multi.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
ncm.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
nokia.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
printer.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
serial.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
tcm_usb_gadget.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
tcm_usb_gadget.h
webcam.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00
zero.c usb: gadget: remove incorrect __init/__exit annotations 2015-04-27 14:45:35 -05:00