Skip to content

Commit

Permalink
i2c-smbus: Use module_i2c_driver()
Browse files Browse the repository at this point in the history
Using module_i2c_driver() makes the code smaller and cleaner.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Fabio Estevam authored and Jean Delvare committed Jul 24, 2012
1 parent 9cd3f2e commit fda2f4a
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/i2c/i2c-smbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,18 +245,7 @@ int i2c_handle_smbus_alert(struct i2c_client *ara)
}
EXPORT_SYMBOL_GPL(i2c_handle_smbus_alert);

static int __init i2c_smbus_init(void)
{
return i2c_add_driver(&smbalert_driver);
}

static void __exit i2c_smbus_exit(void)
{
i2c_del_driver(&smbalert_driver);
}

module_init(i2c_smbus_init);
module_exit(i2c_smbus_exit);
module_i2c_driver(smbalert_driver);

MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>");
MODULE_DESCRIPTION("SMBus protocol extensions support");
Expand Down

0 comments on commit fda2f4a

Please sign in to comment.