diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-23 15:01:59 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 16:58:32 -0700 |
commit | 81ce6864444facc95ba7fe25575153425106c985 (patch) | |
tree | f30825d4a8c4b7b68f3f1b1cf326cddfbf83ba3a /drivers/video/backlight/adp8870_bl.c | |
parent | 7d1ae8a8542dfc5f7eff51f9247bbd69244e9f88 (diff) |
backlight: convert backlight i2c drivers to module_i2c_driver
Factor out some boilerplate code for i2c driver registration into
module_i2c_driver.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/backlight/adp8870_bl.c')
-rw-r--r-- | drivers/video/backlight/adp8870_bl.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/video/backlight/adp8870_bl.c b/drivers/video/backlight/adp8870_bl.c index 6735059376d..9be58c6f18f 100644 --- a/drivers/video/backlight/adp8870_bl.c +++ b/drivers/video/backlight/adp8870_bl.c @@ -991,17 +991,7 @@ static struct i2c_driver adp8870_driver = { .id_table = adp8870_id, }; -static int __init adp8870_init(void) -{ - return i2c_add_driver(&adp8870_driver); -} -module_init(adp8870_init); - -static void __exit adp8870_exit(void) -{ - i2c_del_driver(&adp8870_driver); -} -module_exit(adp8870_exit); +module_i2c_driver(adp8870_driver); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); |