[2/2] drivers: gpio: pca953x: use module_siox_driver()
diff mbox series

Message ID 1560795688-10496-2-git-send-email-info@metux.net
State New
Headers show
Series
  • [1/2] include: linux: siox: more for declaring siox drivers
Related show

Commit Message

Enrico Weigelt, metux IT consult June 17, 2019, 6:21 p.m. UTC
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(-)

Comments

Uwe Kleine-K├Ânig June 18, 2019, 5:46 a.m. UTC | #1
On Mon, Jun 17, 2019 at 08:21:28PM +0200, Enrico Weigelt, metux IT consult wrote:
> 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>

The subject is wrong, this isn't about pca953x.

Best regards
Uwe

Patch
diff mbox series

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");