Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09a0d183 authored by Axel Lin's avatar Axel Lin Committed by Linus Torvalds
Browse files

leds: convert led i2c drivers to module_i2c_driver



Factor out some boilerplate code for i2c driver registration
into module_i2c_driver.

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Cc: Haojian Zhuang <hzhuang1@marvell.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 892a8843
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -813,17 +813,7 @@ static struct i2c_driver bd2802_i2c_driver = {
	.id_table	= bd2802_id,
};

static int __init bd2802_init(void)
{
	return i2c_add_driver(&bd2802_i2c_driver);
}
module_init(bd2802_init);

static void __exit bd2802_exit(void)
{
	i2c_del_driver(&bd2802_i2c_driver);
}
module_exit(bd2802_exit);
module_i2c_driver(bd2802_i2c_driver);

MODULE_AUTHOR("Kim Kyuwon <q1.kim@samsung.com>");
MODULE_DESCRIPTION("BD2802 LED driver");
+1 −12
Original line number Diff line number Diff line
@@ -457,18 +457,7 @@ static struct i2c_driver lm3530_i2c_driver = {
	},
};

static int __init lm3530_init(void)
{
	return i2c_add_driver(&lm3530_i2c_driver);
}

static void __exit lm3530_exit(void)
{
	i2c_del_driver(&lm3530_i2c_driver);
}

module_init(lm3530_init);
module_exit(lm3530_exit);
module_i2c_driver(lm3530_i2c_driver);

MODULE_DESCRIPTION("Back Light driver for LM3530");
MODULE_LICENSE("GPL v2");
+1 −12
Original line number Diff line number Diff line
@@ -453,18 +453,7 @@ static struct i2c_driver lp3944_driver = {
	.id_table = lp3944_id,
};

static int __init lp3944_module_init(void)
{
	return i2c_add_driver(&lp3944_driver);
}

static void __exit lp3944_module_exit(void)
{
	i2c_del_driver(&lp3944_driver);
}

module_init(lp3944_module_init);
module_exit(lp3944_module_exit);
module_i2c_driver(lp3944_driver);

MODULE_AUTHOR("Antonio Ospite <ospite@studenti.unina.it>");
MODULE_DESCRIPTION("LP3944 Fun Light Chip");
+1 −19
Original line number Diff line number Diff line
@@ -797,25 +797,7 @@ static struct i2c_driver lp5521_driver = {
	.id_table	= lp5521_id,
};

static int __init lp5521_init(void)
{
	int ret;

	ret = i2c_add_driver(&lp5521_driver);

	if (ret < 0)
		printk(KERN_ALERT "Adding lp5521 driver failed\n");

	return ret;
}

static void __exit lp5521_exit(void)
{
	i2c_del_driver(&lp5521_driver);
}

module_init(lp5521_init);
module_exit(lp5521_exit);
module_i2c_driver(lp5521_driver);

MODULE_AUTHOR("Mathias Nyman, Yuri Zaporozhets, Samu Onkalo");
MODULE_DESCRIPTION("LP5521 LED engine");
+1 −19
Original line number Diff line number Diff line
@@ -1021,25 +1021,7 @@ static struct i2c_driver lp5523_driver = {
	.id_table	= lp5523_id,
};

static int __init lp5523_init(void)
{
	int ret;

	ret = i2c_add_driver(&lp5523_driver);

	if (ret < 0)
		printk(KERN_ALERT "Adding lp5523 driver failed\n");

	return ret;
}

static void __exit lp5523_exit(void)
{
	i2c_del_driver(&lp5523_driver);
}

module_init(lp5523_init);
module_exit(lp5523_exit);
module_i2c_driver(lp5523_driver);

MODULE_AUTHOR("Mathias Nyman <mathias.nyman@nokia.com>");
MODULE_DESCRIPTION("LP5523 LED engine");
Loading