]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
spi: lm70llp: Switch to use module_parport_driver()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 3 Mar 2021 09:16:42 +0000 (11:16 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 10 Mar 2021 12:46:06 +0000 (12:46 +0000)
Switch to use module_parport_driver() to reduce boilerplate code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210303091642.23929-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-lm70llp.c

index 174dba29b1ddeb03763a918934b2a22e6ef85bf1..f914b8d2043e3e9108d624c0b6e43aad842236cd 100644 (file)
@@ -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@designergraphix.com>");
 MODULE_DESCRIPTION(