From: "Enrico Weigelt, metux IT consult" <info@metux.net>
To: linux-kernel@vger.kernel.org
Cc: kernel@pengutronix.de, linus.walleij@linaro.org,
bgolaszewski@baylibre.com, linux-gpio@vger.kernel.org
Subject: [PATCH v2 2/2] drivers: gpio: siox: use module_siox_driver()
Date: Tue, 18 Jun 2019 12:40:27 +0200 [thread overview]
Message-ID: <1560854427-27537-3-git-send-email-info@metux.net> (raw)
In-Reply-To: <1560854427-27537-1-git-send-email-info@metux.net>
From: Enrico Weigelt <info@metux.net>
Reduce driver init boilerplate by using the new
module_siox_driver() macro.
Signed-off-by: Enrico Weigelt <info@metux.net>
---
drivers/gpio/gpio-siox.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/gpio/gpio-siox.c b/drivers/gpio/gpio-siox.c
index 571b2a8..fb4e318 100644
--- a/drivers/gpio/gpio-siox.c
+++ b/drivers/gpio/gpio-siox.c
@@ -275,18 +275,7 @@ static int gpio_siox_remove(struct siox_device *sdevice)
.name = "gpio-siox",
},
};
-
-static int __init gpio_siox_init(void)
-{
- return siox_driver_register(&gpio_siox_driver);
-}
-module_init(gpio_siox_init);
-
-static void __exit gpio_siox_exit(void)
-{
- siox_driver_unregister(&gpio_siox_driver);
-}
-module_exit(gpio_siox_exit);
+module_siox_driver(gpio_siox_driver);
MODULE_AUTHOR("Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>");
MODULE_DESCRIPTION("SIOX gpio driver");
--
1.9.1
next prev parent reply other threads:[~2019-06-18 10:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 10:40 siox: driver init boilerplate reduction v2 Enrico Weigelt, metux IT consult
2019-06-18 10:40 ` [PATCH v2 1/2] include: linux: siox: more for declaring siox drivers Enrico Weigelt, metux IT consult
2019-06-18 16:17 ` Uwe Kleine-König
2019-06-24 5:33 ` Enrico Weigelt, metux IT consult
2019-06-18 10:40 ` Enrico Weigelt, metux IT consult [this message]
2019-06-18 16:13 ` [PATCH v2 2/2] drivers: gpio: siox: use module_siox_driver() Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1560854427-27537-3-git-send-email-info@metux.net \
--to=info@metux.net \
--cc=bgolaszewski@baylibre.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).