summaryrefslogtreecommitdiff
path: root/drivers/video/backlight/adp8860_bl.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-03-23 15:01:59 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 16:58:32 -0700
commit81ce6864444facc95ba7fe25575153425106c985 (patch)
treef30825d4a8c4b7b68f3f1b1cf326cddfbf83ba3a /drivers/video/backlight/adp8860_bl.c
parent7d1ae8a8542dfc5f7eff51f9247bbd69244e9f88 (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/adp8860_bl.c')
-rw-r--r--drivers/video/backlight/adp8860_bl.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c
index 378276c9d3cf..550dbf0bb896 100644
--- a/drivers/video/backlight/adp8860_bl.c
+++ b/drivers/video/backlight/adp8860_bl.c
@@ -819,17 +819,7 @@ static struct i2c_driver adp8860_driver = {
.id_table = adp8860_id,
};
-static int __init adp8860_init(void)
-{
- return i2c_add_driver(&adp8860_driver);
-}
-module_init(adp8860_init);
-
-static void __exit adp8860_exit(void)
-{
- i2c_del_driver(&adp8860_driver);
-}
-module_exit(adp8860_exit);
+module_i2c_driver(adp8860_driver);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");