From 032fa16d453c562c93b118e1c3e65f183c5f55cc Mon Sep 17 00:00:00 2001 From: Grygorii Strashko Date: Tue, 23 Apr 2013 16:19:10 +0300 Subject: [PATCH] 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 Signed-off-by: Grygorii Strashko Signed-off-by: Samuel Ortiz --- drivers/mfd/twl-core.c | 12 +----------- 1 file changed, 1 insertion(+), 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 = { .remove = twl_remove, }; -static int __init twl_init(void) -{ - return i2c_add_driver(&twl_driver); -} -subsys_initcall(twl_init); - -static void __exit twl_exit(void) -{ - i2c_del_driver(&twl_driver); -} -module_exit(twl_exit); +module_i2c_driver(twl_driver); MODULE_AUTHOR("Texas Instruments, Inc."); MODULE_DESCRIPTION("I2C Core interface for TWL"); -- GitLab