summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-butterfly.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-03-03 11:16:41 +0200
committerMark Brown <broonie@kernel.org>2021-03-10 12:46:05 +0000
commit8c7e98f74cebf22f693494c0a7fe9afe77bd6576 (patch)
treec1f5afb3b2e85950ab2e90e590634023e247a20d /drivers/spi/spi-butterfly.c
parenta0521f70aee008f8b574f13ebdf0010f2f90db62 (diff)
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> Link: https://lore.kernel.org/r/20210303091642.23929-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-butterfly.c')
-rw-r--r--drivers/spi/spi-butterfly.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c
index 7e71a351f3b7..cceae816cebc 100644
--- a/drivers/spi/spi-butterfly.c
+++ b/drivers/spi/spi-butterfly.c
@@ -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");