提交 b9d7adc4 编写于 作者: A Alex Briskin 提交者: Greg Kroah-Hartman

staging: most: hdm_usb: Driver registration with module_driver macro

Register with module_driver macro instead of module_init/module_exit.
Signed-off-by: NAlex Briskin <br.shurik@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 89ff9d58
...@@ -1301,25 +1301,7 @@ static struct usb_driver hdm_usb = { ...@@ -1301,25 +1301,7 @@ static struct usb_driver hdm_usb = {
.disconnect = hdm_disconnect, .disconnect = hdm_disconnect,
}; };
static int __init hdm_usb_init(void) module_usb_driver(hdm_usb);
{
pr_info("hdm_usb_init()\n");
if (usb_register(&hdm_usb)) {
pr_err("could not register hdm_usb driver\n");
return -EIO;
}
return 0;
}
static void __exit hdm_usb_exit(void)
{
pr_info("hdm_usb_exit()\n");
usb_deregister(&hdm_usb);
}
module_init(hdm_usb_init);
module_exit(hdm_usb_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Christian Gromm <christian.gromm@microchip.com>"); MODULE_AUTHOR("Christian Gromm <christian.gromm@microchip.com>");
MODULE_DESCRIPTION("HDM_4_USB"); MODULE_DESCRIPTION("HDM_4_USB");
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册