[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1560796840-18207-3-git-send-email-info@metux.net>
Date: Mon, 17 Jun 2019 20:40:40 +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 3/3] drivers: gpio: mc33880: 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-mc33880.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/gpio/gpio-mc33880.c b/drivers/gpio/gpio-mc33880.c
index f8194f7..1b9434c 100644
--- a/drivers/gpio/gpio-mc33880.c
+++ b/drivers/gpio/gpio-mc33880.c
@@ -156,21 +156,10 @@ static int mc33880_remove(struct spi_device *spi)
.remove = mc33880_remove,
};
-static int __init mc33880_init(void)
-{
- return spi_register_driver(&mc33880_driver);
-}
/* register after spi postcore initcall and before
* subsys initcalls that may rely on these GPIOs
*/
-subsys_initcall(mc33880_init);
-
-static void __exit mc33880_exit(void)
-{
- spi_unregister_driver(&mc33880_driver);
-}
-module_exit(mc33880_exit);
+subsys_spi_driver(mc33880_driver);
MODULE_AUTHOR("Mocean Laboratories <info@...ean-labs.com>");
MODULE_LICENSE("GPL v2");
-
--
1.9.1
Powered by blists - more mailing lists