Skip to contentSkip to conversation

i2c: elektor: Utilize the module_isa_driver macro

PATCH Applied William Breathitt Gray 2 participants 2 messages May 31, 2016 – Jun 19, 2016 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: elektor: Utilize the module_isa_driver macro

This driver does not do anything special in module init/exit. This patch eliminates the module init/exit boilerplate code by utilizing the module_isa_driver macro.

---
 drivers/i2c/busses/i2c-elektor.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/i2c/busses/i2c-elektor.c +1 -12
index 92e8c0c..aa0cc5c 100644
@@ -319,16 +319,6 @@ static struct isa_driver i2c_elektor_driver = {
 	},
 };
 
-static int __init i2c_pcfisa_init(void)
-{
-	return isa_register_driver(&i2c_elektor_driver, 1);
-}
-
-static void __exit i2c_pcfisa_exit(void)
-{
-	isa_unregister_driver(&i2c_elektor_driver);
-}
-
 MODULE_AUTHOR("Hans Berglund <[email protected]>");
 MODULE_DESCRIPTION("I2C-Bus adapter routines for PCF8584 ISA bus adapter");
 MODULE_LICENSE("GPL");
@@ -339,5 +329,4 @@ module_param(clock, int, 0);
 module_param(own, int, 0);
 module_param(mmapped, int, 0);
 
-module_init(i2c_pcfisa_init);
-module_exit(i2c_pcfisa_exit);
+module_isa_driver(i2c_elektor_driver, 1);
Signature · 1 line
2.7.3
Applied
#1 lore raw
Quoted 5 lines · William Breathitt Gray

This driver does not do anything special in module init/exit. This patch eliminates the module init/exit boilerplate code by utilizing the module_isa_driver macro.

Applied to for-next, thanks!