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

parport: convert drivers/parport/* to use module_platform_driver()

This patch converts the drivers in drivers/parport/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Ben Dooks <ben@simtec.co.uk>
Cc: Derrick J. Brashear <shadow@dementia.org>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Axel Lin and committed by
Greg Kroah-Hartman
782ee877 bb74041b

+2 -24
+1 -12
drivers/parport/parport_ax88796.c
··· 420 420 .resume = parport_ax88796_resume, 421 421 }; 422 422 423 - static int __init parport_ax88796_init(void) 424 - { 425 - return platform_driver_register(&axdrv); 426 - } 427 - 428 - static void __exit parport_ax88796_exit(void) 429 - { 430 - platform_driver_unregister(&axdrv); 431 - } 432 - 433 - module_init(parport_ax88796_init) 434 - module_exit(parport_ax88796_exit) 423 + module_platform_driver(axdrv); 435 424 436 425 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); 437 426 MODULE_DESCRIPTION("AX88796 Parport parallel port driver");
+1 -12
drivers/parport/parport_sunbpp.c
··· 391 391 .remove = __devexit_p(bpp_remove), 392 392 }; 393 393 394 - static int __init parport_sunbpp_init(void) 395 - { 396 - return platform_driver_register(&bpp_sbus_driver); 397 - } 398 - 399 - static void __exit parport_sunbpp_exit(void) 400 - { 401 - platform_driver_unregister(&bpp_sbus_driver); 402 - } 394 + module_platform_driver(bpp_sbus_driver); 403 395 404 396 MODULE_AUTHOR("Derrick J Brashear"); 405 397 MODULE_DESCRIPTION("Parport Driver for Sparc bidirectional Port"); 406 398 MODULE_SUPPORTED_DEVICE("Sparc Bidirectional Parallel Port"); 407 399 MODULE_VERSION("2.0"); 408 400 MODULE_LICENSE("GPL"); 409 - 410 - module_init(parport_sunbpp_init) 411 - module_exit(parport_sunbpp_exit)