mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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>
This commit is contained in:
parent
7d1ae8a854
commit
81ce686444
3 changed files with 3 additions and 34 deletions
|
@ -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>");
|
||||
|
|
|
@ -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>");
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue