Skip to content

Commit

Permalink
mfd: twl-core: Convert to module_i2c_driver()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Grygorii Strashko <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
  • Loading branch information
grygoriyS authored and Samuel Ortiz committed Jun 11, 2013
1 parent 9032eab commit 032fa16
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/mfd/twl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 032fa16

Please sign in to comment.