diff options
author | Liu Shixin <liushixin2@huawei.com> | 2020-09-18 06:10:12 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-22 11:37:19 +0300 |
commit | 183fba0ab1f90df01836408e52eb9fb63ee753d8 (patch) | |
tree | 3c5daca11e716dc912df2cbf7605e88639512139 /drivers/usb/misc/appledisplay.c | |
parent | 0895660941164c0f374dd8f20c1343bb8ca636bb (diff) | |
download | linux-183fba0ab1f90df01836408e52eb9fb63ee753d8.tar.xz |
usb: appledisplay: use module_usb_driver to simplify the code
module_usb_driver() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Link: https://lore.kernel.org/r/20200918031012.3980558-1-liushixin2@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/appledisplay.c')
-rw-r--r-- | drivers/usb/misc/appledisplay.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c index 36fed1a09666..c8098e9b432e 100644 --- a/drivers/usb/misc/appledisplay.c +++ b/drivers/usb/misc/appledisplay.c @@ -342,20 +342,8 @@ static struct usb_driver appledisplay_driver = { .disconnect = appledisplay_disconnect, .id_table = appledisplay_table, }; - -static int __init appledisplay_init(void) -{ - return usb_register(&appledisplay_driver); -} - -static void __exit appledisplay_exit(void) -{ - usb_deregister(&appledisplay_driver); -} +module_usb_driver(appledisplay_driver); MODULE_AUTHOR("Michael Hanselmann"); MODULE_DESCRIPTION("Apple Cinema Display driver"); MODULE_LICENSE("GPL"); - -module_init(appledisplay_init); -module_exit(appledisplay_exit); |