diff options
author | Alex Briskin <br.shurik@gmail.com> | 2017-08-27 08:22:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-27 20:59:10 +0300 |
commit | b9d7adc45d8837040a9f2cea584b4e0ef25ca271 (patch) | |
tree | 256c0d146bfb8871a404a438510b44f53dd3c202 /drivers/staging/most | |
parent | 89ff9d58e6b61bc90638157ae9ec21f6e3186a5a (diff) | |
download | linux-b9d7adc45d8837040a9f2cea584b4e0ef25ca271.tar.xz |
staging: most: hdm_usb: Driver registration with module_driver macro
Register with module_driver macro instead of module_init/module_exit.
Signed-off-by: Alex Briskin <br.shurik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r-- | drivers/staging/most/hdm-usb/hdm_usb.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c index a9c3785d19ae..85775da293fb 100644 --- a/drivers/staging/most/hdm-usb/hdm_usb.c +++ b/drivers/staging/most/hdm-usb/hdm_usb.c @@ -1301,25 +1301,7 @@ static struct usb_driver hdm_usb = { .disconnect = hdm_disconnect, }; -static int __init hdm_usb_init(void) -{ - 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_usb_driver(hdm_usb); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Christian Gromm <christian.gromm@microchip.com>"); MODULE_DESCRIPTION("HDM_4_USB"); |