aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrygorii Strashko <grygorii.strashko@ti.com>2013-04-23 09:19:10 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-06-11 13:27:51 -0400
commit032fa16d453c562c93b118e1c3e65f183c5f55cc (patch)
tree41c362593ba05d54c9f846664b5f7711fe55e0e3
parent9032eabdd3fcfc00aa513a9eef54002cbabb8c9a (diff)
mfd: twl-core: Convert to module_i2c_driver()
Shift TWL initialization to module/device init layer, because I2C now is not initialized on subsys init layer and shifted to module/device init layer instead. The I2C <--> TWL dependency should be resolved in drivers/Makefile now. Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--drivers/mfd/twl-core.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 89ab4d970643..8d9bc10c5312 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -1305,17 +1305,7 @@ static struct i2c_driver twl_driver = {
1305 .remove = twl_remove, 1305 .remove = twl_remove,
1306}; 1306};
1307 1307
1308static int __init twl_init(void) 1308module_i2c_driver(twl_driver);
1309{
1310 return i2c_add_driver(&twl_driver);
1311}
1312subsys_initcall(twl_init);
1313
1314static void __exit twl_exit(void)
1315{
1316 i2c_del_driver(&twl_driver);
1317}
1318module_exit(twl_exit);
1319 1309
1320MODULE_AUTHOR("Texas Instruments, Inc."); 1310MODULE_AUTHOR("Texas Instruments, Inc.");
1321MODULE_DESCRIPTION("I2C Core interface for TWL"); 1311MODULE_DESCRIPTION("I2C Core interface for TWL");