[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1560796840-18207-2-git-send-email-info@metux.net>
Date: Mon, 17 Jun 2019 20:40:39 +0200
From: "Enrico Weigelt, metux IT consult" <info@...ux.net>
To: linux-kernel@...r.kernel.org
Cc: linus.walleij@...aro.org, bgolaszewski@...libre.com,
broonie@...nel.org, linux-gpio@...r.kernel.org,
linux-spi@...r.kernel.org
Subject: [PATCH 2/3] drivers: gpio: pcf857x: use subsys_spi_driver()
From: Enrico Weigelt <info@...ux.net>
Reduce driver init boilerplate by using the new
subsys_spi_driver() macro.
Signed-off-by: Enrico Weigelt <info@...ux.net>
---
drivers/gpio/gpio-max7301.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/gpio/gpio-max7301.c b/drivers/gpio/gpio-max7301.c
index 647dfbb..30815cf 100644
--- a/drivers/gpio/gpio-max7301.c
+++ b/drivers/gpio/gpio-max7301.c
@@ -86,21 +86,10 @@ static int max7301_remove(struct spi_device *spi)
.remove = max7301_remove,
.id_table = max7301_id,
};
-
-static int __init max7301_init(void)
-{
- return spi_register_driver(&max7301_driver);
-}
/* register after spi postcore initcall and before
* subsys initcalls that may rely on these GPIOs
*/
-subsys_initcall(max7301_init);
-
-static void __exit max7301_exit(void)
-{
- spi_unregister_driver(&max7301_driver);
-}
-module_exit(max7301_exit);
+subsys_spi_driver(max7301_driver);
MODULE_AUTHOR("Juergen Beisert, Wolfram Sang");
MODULE_LICENSE("GPL v2");
--
1.9.1
Powered by blists - more mailing lists