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

Commit 0abc9201 authored by Axel Lin's avatar Axel Lin Committed by Linus Torvalds
Browse files

rtc: convert rtc 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: Piotr Ziecik <kosmo@semihalf.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Roman Fietze <roman.fietze@telemotive.de>
Cc: Herbert Valerio Riedel <hvr@gnu.org>
Cc: Alexander Bigga <ab@mycable.de>
Cc: Dale Farnsworth <dale@farnsworth.org>
Cc: Gregory Hermant <gregory.hermant@calao-systems.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Martyn Welch <martyn.welch@ge.com>
Cc: Byron Bradley <byron.bbradley@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 109e9418
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -187,17 +187,7 @@ static struct i2c_driver bq32k_driver = {
	.id_table	= bq32k_id,
};

static __init int bq32k_init(void)
{
	return i2c_add_driver(&bq32k_driver);
}
module_init(bq32k_init);

static __exit void bq32k_exit(void)
{
	i2c_del_driver(&bq32k_driver);
}
module_exit(bq32k_exit);
module_i2c_driver(bq32k_driver);

MODULE_AUTHOR("Semihalf, Piotr Ziecik <kosmo@semihalf.com>");
MODULE_DESCRIPTION("TI BQ32000 I2C RTC driver");
+1 −11
Original line number Diff line number Diff line
@@ -938,17 +938,7 @@ static struct i2c_driver ds1307_driver = {
	.id_table	= ds1307_id,
};

static int __init ds1307_init(void)
{
	return i2c_add_driver(&ds1307_driver);
}
module_init(ds1307_init);

static void __exit ds1307_exit(void)
{
	i2c_del_driver(&ds1307_driver);
}
module_exit(ds1307_exit);
module_i2c_driver(ds1307_driver);

MODULE_DESCRIPTION("RTC driver for DS1307 and similar chips");
MODULE_LICENSE("GPL");
+1 −12
Original line number Diff line number Diff line
@@ -446,18 +446,7 @@ static struct i2c_driver ds1374_driver = {
	.id_table = ds1374_id,
};

static int __init ds1374_init(void)
{
	return i2c_add_driver(&ds1374_driver);
}

static void __exit ds1374_exit(void)
{
	i2c_del_driver(&ds1374_driver);
}

module_init(ds1374_init);
module_exit(ds1374_exit);
module_i2c_driver(ds1374_driver);

MODULE_AUTHOR("Scott Wood <scottwood@freescale.com>");
MODULE_DESCRIPTION("Maxim/Dallas DS1374 RTC Driver");
+1 −12
Original line number Diff line number Diff line
@@ -202,20 +202,9 @@ static struct i2c_driver ds1672_driver = {
	.id_table = ds1672_id,
};

static int __init ds1672_init(void)
{
	return i2c_add_driver(&ds1672_driver);
}

static void __exit ds1672_exit(void)
{
	i2c_del_driver(&ds1672_driver);
}
module_i2c_driver(ds1672_driver);

MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
MODULE_DESCRIPTION("Dallas/Maxim DS1672 timekeeper driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);

module_init(ds1672_init);
module_exit(ds1672_exit);
+1 −12
Original line number Diff line number Diff line
@@ -473,18 +473,7 @@ static struct i2c_driver ds3232_driver = {
	.id_table = ds3232_id,
};

static int __init ds3232_init(void)
{
	return i2c_add_driver(&ds3232_driver);
}

static void __exit ds3232_exit(void)
{
	i2c_del_driver(&ds3232_driver);
}

module_init(ds3232_init);
module_exit(ds3232_exit);
module_i2c_driver(ds3232_driver);

MODULE_AUTHOR("Srikanth Srinivasan <srikanth.srinivasan@freescale.com>");
MODULE_DESCRIPTION("Maxim/Dallas DS3232 RTC Driver");
Loading