Skip to content

Commit

Permalink
regulator: lp3971: Convert to module_i2c_driver()
Browse files Browse the repository at this point in the history
Unusual to see a regulator driver not using subsys_initcall() but with
the probe deferral support should be becoming more and more viable.

Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
broonie committed Apr 4, 2012
1 parent 8df8d8a commit 5af34e6
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions drivers/regulator/lp3971.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,23 +517,7 @@ static struct i2c_driver lp3971_i2c_driver = {
.id_table = lp3971_i2c_id,
};

static int __init lp3971_module_init(void)
{
int ret;

ret = i2c_add_driver(&lp3971_i2c_driver);
if (ret != 0)
pr_err("Failed to register I2C driver: %d\n", ret);

return ret;
}
module_init(lp3971_module_init);

static void __exit lp3971_module_exit(void)
{
i2c_del_driver(&lp3971_i2c_driver);
}
module_exit(lp3971_module_exit);
module_i2c_driver(lp3971_i2c_driver);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Marek Szyprowski <[email protected]>");
Expand Down

0 comments on commit 5af34e6

Please sign in to comment.