Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 183fba0a authored by Liu Shixin's avatar Liu Shixin Committed by Greg Kroah-Hartman
Browse files

usb: appledisplay: use module_usb_driver to simplify the code


module_usb_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
Link: https://lore.kernel.org/r/20200918031012.3980558-1-liushixin2@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 08956609
Branches
Tags
No related merge requests found
......@@ -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);
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment