diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-03 18:33:10 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-04 06:39:17 -0400 |
commit | 5af34e60dc6d1943ade104bca0b289486b39bc4a (patch) | |
tree | d1f9707b7efbb7f8ceb1172c9787c48378d16a28 | |
parent | 8df8d8a03865b468318302ba9410aad92e94aaa6 (diff) |
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 <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | drivers/regulator/lp3971.c | 18 |
1 files changed, 1 insertions, 17 deletions
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 = { | |||
517 | .id_table = lp3971_i2c_id, | 517 | .id_table = lp3971_i2c_id, |
518 | }; | 518 | }; |
519 | 519 | ||
520 | static int __init lp3971_module_init(void) | 520 | module_i2c_driver(lp3971_i2c_driver); |
521 | { | ||
522 | int ret; | ||
523 | |||
524 | ret = i2c_add_driver(&lp3971_i2c_driver); | ||
525 | if (ret != 0) | ||
526 | pr_err("Failed to register I2C driver: %d\n", ret); | ||
527 | |||
528 | return ret; | ||
529 | } | ||
530 | module_init(lp3971_module_init); | ||
531 | |||
532 | static void __exit lp3971_module_exit(void) | ||
533 | { | ||
534 | i2c_del_driver(&lp3971_i2c_driver); | ||
535 | } | ||
536 | module_exit(lp3971_module_exit); | ||
537 | 521 | ||
538 | MODULE_LICENSE("GPL"); | 522 | MODULE_LICENSE("GPL"); |
539 | MODULE_AUTHOR("Marek Szyprowski <m.szyprowski@samsung.com>"); | 523 | MODULE_AUTHOR("Marek Szyprowski <m.szyprowski@samsung.com>"); |