aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-smbus.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2012-07-24 08:13:57 -0400
committerJean Delvare <khali@endymion.delvare>2012-07-24 08:13:57 -0400
commitfda2f4af37ccc80d655a5b4538288d461539b574 (patch)
treebfc65bd905bb65732755c1480455615bdc4802ff /drivers/i2c/i2c-smbus.c
parent9cd3f2e8496ce97a9218d8b0ace06c4d8f0c6bf5 (diff)
i2c-smbus: Use module_i2c_driver()
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>
Diffstat (limited to 'drivers/i2c/i2c-smbus.c')
-rw-r--r--drivers/i2c/i2c-smbus.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c
index 9836d08f7a77..df3e0bf31eb3 100644
--- a/drivers/i2c/i2c-smbus.c
+++ b/drivers/i2c/i2c-smbus.c
@@ -245,18 +245,7 @@ int i2c_handle_smbus_alert(struct i2c_client *ara)
245} 245}
246EXPORT_SYMBOL_GPL(i2c_handle_smbus_alert); 246EXPORT_SYMBOL_GPL(i2c_handle_smbus_alert);
247 247
248static int __init i2c_smbus_init(void) 248module_i2c_driver(smbalert_driver);
249{
250 return i2c_add_driver(&smbalert_driver);
251}
252
253static void __exit i2c_smbus_exit(void)
254{
255 i2c_del_driver(&smbalert_driver);
256}
257
258module_init(i2c_smbus_init);
259module_exit(i2c_smbus_exit);
260 249
261MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>"); 250MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>");
262MODULE_DESCRIPTION("SMBus protocol extensions support"); 251MODULE_DESCRIPTION("SMBus protocol extensions support");