From: Mark Brown Date: Tue, 3 Apr 2012 22:33:10 +0000 (+0100) Subject: regulator: lp3971: Convert to module_i2c_driver() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5af34e60dc6d1943ade104bca0b289486b39bc4a;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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: Mark Brown --- diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c index 49bcdb034895..2013525f4bf9 100644 --- a/drivers/regulator/lp3971.c +++ b/drivers/regulator/lp3971.c @@ -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 ");