Commit 5af34e60 authored by Mark Brown's avatar Mark Brown

regulator: lp3971: Convert to module_i2c_driver()

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 8df8d8a0
...@@ -517,23 +517,7 @@ static struct i2c_driver lp3971_i2c_driver = { ...@@ -517,23 +517,7 @@ static struct i2c_driver lp3971_i2c_driver = {
.id_table = lp3971_i2c_id, .id_table = lp3971_i2c_id,
}; };
static int __init lp3971_module_init(void) module_i2c_driver(lp3971_i2c_driver);
{
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_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Marek Szyprowski <m.szyprowski@samsung.com>"); MODULE_AUTHOR("Marek Szyprowski <m.szyprowski@samsung.com>");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment