Skip to content
Permalink
Browse files
spi: butterfly: Switch to use module_parport_driver()
Switch to use module_parport_driver() to reduce boilerplate code.
Note, device_initcall() is a default for module_init().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  • Loading branch information
andy-shev authored and intel-lab-lkp committed Feb 15, 2021
1 parent f67b807 commit 59847957f9c092e0c9530501dcaf0d0b5e3f193a
Showing 1 changed file with 1 addition and 12 deletions.
@@ -317,18 +317,7 @@ static struct parport_driver butterfly_driver = {
.detach = butterfly_detach,
.devmodel = true,
};

static int __init butterfly_init(void)
{
return parport_register_driver(&butterfly_driver);
}
device_initcall(butterfly_init);

static void __exit butterfly_exit(void)
{
parport_unregister_driver(&butterfly_driver);
}
module_exit(butterfly_exit);
module_parport_driver(butterfly_driver);

MODULE_DESCRIPTION("Parport Adapter driver for AVR Butterfly");
MODULE_LICENSE("GPL");

0 comments on commit 5984795

Please sign in to comment.