aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-26 23:43:49 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-30 06:11:46 -0500
commit782ee87702fbd0a175da64a8e71e029b19ef97bf (patch)
tree409b10e9dc2293b6c54d3861de3386b703521083
parentbb74041b1367b4935b8284a2b541f5e4365d3f50 (diff)
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>
-rw-r--r--drivers/parport/parport_ax88796.c13
-rw-r--r--drivers/parport/parport_sunbpp.c13
2 files changed, 2 insertions, 24 deletions
diff --git a/drivers/parport/parport_ax88796.c b/drivers/parport/parport_ax88796.c
index 844f6137970..7c5d86696ee 100644
--- a/drivers/parport/parport_ax88796.c
+++ b/drivers/parport/parport_ax88796.c
@@ -420,18 +420,7 @@ static struct platform_driver axdrv = {
420 .resume = parport_ax88796_resume, 420 .resume = parport_ax88796_resume,
421}; 421};
422 422
423static int __init parport_ax88796_init(void) 423module_platform_driver(axdrv);
424{
425 return platform_driver_register(&axdrv);
426}
427
428static void __exit parport_ax88796_exit(void)
429{
430 platform_driver_unregister(&axdrv);
431}
432
433module_init(parport_ax88796_init)
434module_exit(parport_ax88796_exit)
435 424
436MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); 425MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
437MODULE_DESCRIPTION("AX88796 Parport parallel port driver"); 426MODULE_DESCRIPTION("AX88796 Parport parallel port driver");
diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c
index 910c5a26e34..9390a534a2b 100644
--- a/drivers/parport/parport_sunbpp.c
+++ b/drivers/parport/parport_sunbpp.c
@@ -391,21 +391,10 @@ static struct platform_driver bpp_sbus_driver = {
391 .remove = __devexit_p(bpp_remove), 391 .remove = __devexit_p(bpp_remove),
392}; 392};
393 393
394static int __init parport_sunbpp_init(void) 394module_platform_driver(bpp_sbus_driver);
395{
396 return platform_driver_register(&bpp_sbus_driver);
397}
398
399static void __exit parport_sunbpp_exit(void)
400{
401 platform_driver_unregister(&bpp_sbus_driver);
402}
403 395
404MODULE_AUTHOR("Derrick J Brashear"); 396MODULE_AUTHOR("Derrick J Brashear");
405MODULE_DESCRIPTION("Parport Driver for Sparc bidirectional Port"); 397MODULE_DESCRIPTION("Parport Driver for Sparc bidirectional Port");
406MODULE_SUPPORTED_DEVICE("Sparc Bidirectional Parallel Port"); 398MODULE_SUPPORTED_DEVICE("Sparc Bidirectional Parallel Port");
407MODULE_VERSION("2.0"); 399MODULE_VERSION("2.0");
408MODULE_LICENSE("GPL"); 400MODULE_LICENSE("GPL");
409
410module_init(parport_sunbpp_init)
411module_exit(parport_sunbpp_exit)