[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210216110741.1286-3-andriy.shevchenko@linux.intel.com>
Date: Tue, 16 Feb 2021 13:07:41 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Mark Brown <broonie@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Sudip Mukherjee <sudipm.mukherjee@...il.com>,
linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 3/3] spi: lm70llp: Switch to use module_parport_driver()
Switch to use module_parport_driver() to reduce boilerplate code.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Acked-by: Mark Brown <broonie@...nel.org>
---
v2: added Ack (Mark), drop unneeded note from the commit message
drivers/spi/spi-lm70llp.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c
index 174dba29b1dd..f914b8d2043e 100644
--- a/drivers/spi/spi-lm70llp.c
+++ b/drivers/spi/spi-lm70llp.c
@@ -320,18 +320,7 @@ static struct parport_driver spi_lm70llp_drv = {
.detach = spi_lm70llp_detach,
.devmodel = true,
};
-
-static int __init init_spi_lm70llp(void)
-{
- return parport_register_driver(&spi_lm70llp_drv);
-}
-module_init(init_spi_lm70llp);
-
-static void __exit cleanup_spi_lm70llp(void)
-{
- parport_unregister_driver(&spi_lm70llp_drv);
-}
-module_exit(cleanup_spi_lm70llp);
+module_parport_driver(spi_lm70llp_drv);
MODULE_AUTHOR("Kaiwan N Billimoria <kaiwan@...ignergraphix.com>");
MODULE_DESCRIPTION(
--
2.30.0
Powered by blists - more mailing lists