lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 17 Jun 2019 20:41:11 +0200
From:   "Enrico Weigelt, metux IT consult" <info@...ux.net>
To:     linux-kernel@...r.kernel.org
Cc:     thloh@...era.com, linus.walleij@...aro.org,
        bgolaszewski@...libre.com, andriy.shevchenko@...ux.intel.com,
        shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
        festevam@...il.com, linux-imx@....com, grygorii.strashko@...com,
        ssantosh@...nel.org, khilman@...nel.org, mcoquelin.stm32@...il.com,
        alexandre.torgue@...com, linux-gpio@...r.kernel.org,
        linux-omap@...r.kernel.org, linux-tegra@...r.kernel.org,
        patches@...nsource.cirrus.com
Subject: [PATCH 30/30] drivers: gpio: max732x: use subsys_i2c_driver()

From: Enrico Weigelt <info@...ux.net>

Reduce driver init boilerplate by using the new
subsys_i2c_driver() macro.

Signed-off-by: Enrico Weigelt <info@...ux.net>
---
 drivers/gpio/gpio-max732x.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c
index 5e4102e..c340883 100644
--- a/drivers/gpio/gpio-max732x.c
+++ b/drivers/gpio/gpio-max732x.c
@@ -756,21 +756,10 @@ static int max732x_remove(struct i2c_client *client)
 	.remove		= max732x_remove,
 	.id_table	= max732x_id,
 };
-
-static int __init max732x_init(void)
-{
-	return i2c_add_driver(&max732x_driver);
-}
 /* register after i2c postcore initcall and before
  * subsys initcalls that may rely on these GPIOs
  */
-subsys_initcall(max732x_init);
-
-static void __exit max732x_exit(void)
-{
-	i2c_del_driver(&max732x_driver);
-}
-module_exit(max732x_exit);
+subsys_i2c_driver(max732x_driver);
 
 MODULE_AUTHOR("Eric Miao <eric.miao@...vell.com>");
 MODULE_DESCRIPTION("GPIO expander driver for MAX732X");
-- 
1.9.1

Powered by blists - more mailing lists