summaryrefslogtreecommitdiff
path: root/drivers/video/backlight/tosa_bl.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-03-24 02:01:59 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-24 03:58:32 +0400
commit81ce6864444facc95ba7fe25575153425106c985 (patch)
treef30825d4a8c4b7b68f3f1b1cf326cddfbf83ba3a /drivers/video/backlight/tosa_bl.c
parent7d1ae8a8542dfc5f7eff51f9247bbd69244e9f88 (diff)
downloadlinux-81ce6864444facc95ba7fe25575153425106c985.tar.xz
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/tosa_bl.c')
-rw-r--r--drivers/video/backlight/tosa_bl.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/video/backlight/tosa_bl.c b/drivers/video/backlight/tosa_bl.c
index 425a7365470b..2b241abced43 100644
--- a/drivers/video/backlight/tosa_bl.c
+++ b/drivers/video/backlight/tosa_bl.c
@@ -181,18 +181,7 @@ static struct i2c_driver tosa_bl_driver = {
.id_table = tosa_bl_id,
};
-static int __init tosa_bl_init(void)
-{
- return i2c_add_driver(&tosa_bl_driver);
-}
-
-static void __exit tosa_bl_exit(void)
-{
- i2c_del_driver(&tosa_bl_driver);
-}
-
-module_init(tosa_bl_init);
-module_exit(tosa_bl_exit);
+module_i2c_driver(tosa_bl_driver);
MODULE_AUTHOR("Dmitry Baryshkov");
MODULE_LICENSE("GPL v2");