usb: gadget: printer: use module_usb_composite_driver helper macro

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>
This commit is contained in:
Andrzej Pietrasiewicz 2015-03-03 10:52:31 +01:00 committed by Felipe Balbi
parent d85dc4824c
commit a2a8e48a94
1 changed files with 1 additions and 13 deletions

View 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");