usb: gadget: printer: use module_usb_composite_driver helper macro
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Tue, 3 Mar 2015 09:52:31 +0000 (10:52 +0100)
committerFelipe Balbi <balbi@ti.com>
Tue, 10 Mar 2015 20:33:41 +0000 (15:33 -0500)
Substitute some boilerplate code with a dedicated macro.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/legacy/printer.c

index a8050f8cbe1109503964cebfc022db1da7204dd7..d5b6ee725a2ac04030ac52fc4b4e9c93477a90b6 100644 (file)
@@ -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");