From: Andrzej Pietrasiewicz Date: Tue, 3 Mar 2015 09:52:31 +0000 (+0100) Subject: usb: gadget: printer: use module_usb_composite_driver helper macro X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a2a8e48a94c78c72b5dd1e4c8d190c5c54aca7a4;p=openwrt%2Fstaging%2Fblogic.git usb: gadget: printer: use module_usb_composite_driver helper macro Substitute some boilerplate code with a dedicated macro. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/legacy/printer.c b/drivers/usb/gadget/legacy/printer.c index a8050f8cbe11..d5b6ee725a2a 100644 --- a/drivers/usb/gadget/legacy/printer.c +++ b/drivers/usb/gadget/legacy/printer.c @@ -208,19 +208,7 @@ static __refdata struct usb_composite_driver printer_driver = { .unbind = printer_unbind, }; -static int __init -init(void) -{ - return usb_composite_probe(&printer_driver); -} -module_init(init); - -static void __exit -cleanup(void) -{ - usb_composite_unregister(&printer_driver); -} -module_exit(cleanup); +module_usb_composite_driver(printer_driver); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR("Craig Nadler");