summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc/fusb300_udc.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-04-11 00:14:21 +0200
committerFelipe Balbi <balbi@ti.com>2015-04-27 14:45:35 -0500
commitc94e289f195e0e13cf34d27f9338d28221a85751 (patch)
tree7f34ce1c30fe9197a5913112a882159943557abb /drivers/usb/gadget/udc/fusb300_udc.c
parent197d0bdf8b0168d69c400d3936d08066ab1499a7 (diff)
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>
Diffstat (limited to 'drivers/usb/gadget/udc/fusb300_udc.c')
-rw-r--r--drivers/usb/gadget/udc/fusb300_udc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/fusb300_udc.c b/drivers/usb/gadget/udc/fusb300_udc.c
index fb4df159d32d..3970f453de49 100644
--- a/drivers/usb/gadget/udc/fusb300_udc.c
+++ b/drivers/usb/gadget/udc/fusb300_udc.c
@@ -1342,7 +1342,7 @@ static const struct usb_gadget_ops fusb300_gadget_ops = {
.udc_stop = fusb300_udc_stop,
};
-static int __exit fusb300_remove(struct platform_device *pdev)
+static int fusb300_remove(struct platform_device *pdev)
{
struct fusb300 *fusb300 = platform_get_drvdata(pdev);
@@ -1492,7 +1492,7 @@ clean_up:
}
static struct platform_driver fusb300_driver = {
- .remove = __exit_p(fusb300_remove),
+ .remove = fusb300_remove,
.driver = {
.name = (char *) udc_name,
},