diff mbox series

[3/3] hwmon: (isl28022) apply coding style to module init/exit

Message ID 20241120083349.22226-8-wsa+renesas@sang-engineering.com (mailing list archive)
State Accepted
Headers show
Series hwmon: (isl28022) doc fixes and minor code cleanup | expand

Commit Message

Wolfram Sang Nov. 20, 2024, 8:33 a.m. UTC
Function declarations can be in one line. module_init|exit macros should
be tied to the function.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/hwmon/isl28022.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Comments

Guenter Roeck Nov. 20, 2024, 3:03 p.m. UTC | #1
On Wed, Nov 20, 2024 at 09:33:52AM +0100, Wolfram Sang wrote:
> Function declarations can be in one line. module_init|exit macros should
> be tied to the function.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied.

Thanks,
Guenter
diff mbox series

Patch

diff --git a/drivers/hwmon/isl28022.c b/drivers/hwmon/isl28022.c
index f9edcfd164c2..7748f6b8a534 100644
--- a/drivers/hwmon/isl28022.c
+++ b/drivers/hwmon/isl28022.c
@@ -506,8 +506,7 @@  static struct i2c_driver isl28022_driver = {
 	.id_table	= isl28022_ids,
 };
 
-static int __init
-isl28022_init(void)
+static int __init isl28022_init(void)
 {
 	int err;
 
@@ -519,15 +518,13 @@  isl28022_init(void)
 	debugfs_remove_recursive(isl28022_debugfs_root);
 	return err;
 }
+module_init(isl28022_init);
 
-static void __exit
-isl28022_exit(void)
+static void __exit isl28022_exit(void)
 {
 	i2c_del_driver(&isl28022_driver);
 	debugfs_remove_recursive(isl28022_debugfs_root);
 }
-
-module_init(isl28022_init);
 module_exit(isl28022_exit);
 
 MODULE_AUTHOR("Carsten Spieß <mail@carsten-spiess.de>");