Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Liu Shixin and committed by
Greg Kroah-Hartman
183fba0a 08956609

+1 -13
+1 -13
drivers/usb/misc/appledisplay.c
··· 342 342 .disconnect = appledisplay_disconnect, 343 343 .id_table = appledisplay_table, 344 344 }; 345 - 346 - static int __init appledisplay_init(void) 347 - { 348 - return usb_register(&appledisplay_driver); 349 - } 350 - 351 - static void __exit appledisplay_exit(void) 352 - { 353 - usb_deregister(&appledisplay_driver); 354 - } 345 + module_usb_driver(appledisplay_driver); 355 346 356 347 MODULE_AUTHOR("Michael Hanselmann"); 357 348 MODULE_DESCRIPTION("Apple Cinema Display driver"); 358 349 MODULE_LICENSE("GPL"); 359 - 360 - module_init(appledisplay_init); 361 - module_exit(appledisplay_exit);