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

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
......@@ -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");
......
......@@ -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");
......@@ -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");
......
......@@ -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);
......@@ -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");
......
......@@ -144,19 +144,8 @@ static struct i2c_driver em3027_driver = {
.id_table = em3027_id,
};
static int __init em3027_init(void)
{
return i2c_add_driver(&em3027_driver);
}
static void __exit em3027_exit(void)
{
i2c_del_driver(&em3027_driver);
}
module_i2c_driver(em3027_driver);
MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
MODULE_DESCRIPTION("EM Microelectronic EM3027 RTC driver");
MODULE_LICENSE("GPL");
module_init(em3027_init);
module_exit(em3027_exit);
......@@ -565,17 +565,7 @@ static struct i2c_driver fm3130_driver = {
.id_table = fm3130_id,
};
static int __init fm3130_init(void)
{
return i2c_add_driver(&fm3130_driver);
}
module_init(fm3130_init);
static void __exit fm3130_exit(void)
{
i2c_del_driver(&fm3130_driver);
}
module_exit(fm3130_exit);
module_i2c_driver(fm3130_driver);
MODULE_DESCRIPTION("RTC driver for FM3130");
MODULE_AUTHOR("Sergey Lapin <slapin@ossfans.org>");
......
......@@ -309,18 +309,7 @@ static struct i2c_driver isl12022_driver = {
.id_table = isl12022_id,
};
static int __init isl12022_init(void)
{
return i2c_add_driver(&isl12022_driver);
}
static void __exit isl12022_exit(void)
{
i2c_del_driver(&isl12022_driver);
}
module_init(isl12022_init);
module_exit(isl12022_exit);
module_i2c_driver(isl12022_driver);
MODULE_AUTHOR("roman.fietze@telemotive.de");
MODULE_DESCRIPTION("ISL 12022 RTC driver");
......
......@@ -710,22 +710,9 @@ static struct i2c_driver isl1208_driver = {
.id_table = isl1208_id,
};
static int __init
isl1208_init(void)
{
return i2c_add_driver(&isl1208_driver);
}
static void __exit
isl1208_exit(void)
{
i2c_del_driver(&isl1208_driver);
}
module_i2c_driver(isl1208_driver);
MODULE_AUTHOR("Herbert Valerio Riedel <hvr@gnu.org>");
MODULE_DESCRIPTION("Intersil ISL1208 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
module_init(isl1208_init);
module_exit(isl1208_exit);
......@@ -900,20 +900,9 @@ static struct i2c_driver m41t80_driver = {
.id_table = m41t80_id,
};
static int __init m41t80_rtc_init(void)
{
return i2c_add_driver(&m41t80_driver);
}
static void __exit m41t80_rtc_exit(void)
{
i2c_del_driver(&m41t80_driver);
}
module_i2c_driver(m41t80_driver);
MODULE_AUTHOR("Alexander Bigga <ab@mycable.de>");
MODULE_DESCRIPTION("ST Microelectronics M41T80 series RTC I2C Client Driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
module_init(m41t80_rtc_init);
module_exit(m41t80_rtc_exit);
......@@ -261,20 +261,9 @@ static struct i2c_driver max6900_driver = {
.id_table = max6900_id,
};
static int __init max6900_init(void)
{
return i2c_add_driver(&max6900_driver);
}
static void __exit max6900_exit(void)
{
i2c_del_driver(&max6900_driver);
}
module_i2c_driver(max6900_driver);
MODULE_DESCRIPTION("Maxim MAX6900 RTC driver");
MODULE_AUTHOR("Dale Farnsworth <dale@farnsworth.org>");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
module_init(max6900_init);
module_exit(max6900_exit);
......@@ -252,20 +252,9 @@ static struct i2c_driver pcf8563_driver = {
.id_table = pcf8563_id,
};
static int __init pcf8563_init(void)
{
return i2c_add_driver(&pcf8563_driver);
}
static void __exit pcf8563_exit(void)
{
i2c_del_driver(&pcf8563_driver);
}
module_i2c_driver(pcf8563_driver);
MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
MODULE_DESCRIPTION("Philips PCF8563/Epson RTC8564 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
module_init(pcf8563_init);
module_exit(pcf8563_exit);
......@@ -320,18 +320,7 @@ static struct i2c_driver pcf8583_driver = {
.id_table = pcf8583_id,
};
static __init int pcf8583_init(void)
{
return i2c_add_driver(&pcf8583_driver);
}
static __exit void pcf8583_exit(void)
{
i2c_del_driver(&pcf8583_driver);
}
module_init(pcf8583_init);
module_exit(pcf8583_exit);
module_i2c_driver(pcf8583_driver);
MODULE_AUTHOR("Russell King");
MODULE_DESCRIPTION("PCF8583 I2C RTC driver");
......
......@@ -689,18 +689,7 @@ static struct i2c_driver rs5c372_driver = {
.id_table = rs5c372_id,
};
static __init int rs5c372_init(void)
{
return i2c_add_driver(&rs5c372_driver);
}
static __exit void rs5c372_exit(void)
{
i2c_del_driver(&rs5c372_driver);
}
module_init(rs5c372_init);
module_exit(rs5c372_exit);
module_i2c_driver(rs5c372_driver);
MODULE_AUTHOR(
"Pavel Mironchik <pmironchik@optifacio.net>, "
......
......@@ -436,18 +436,7 @@ static struct i2c_driver rv3029c2_driver = {
.id_table = rv3029c2_id,
};
static int __init rv3029c2_init(void)
{
return i2c_add_driver(&rv3029c2_driver);
}
static void __exit rv3029c2_exit(void)
{
i2c_del_driver(&rv3029c2_driver);
}
module_init(rv3029c2_init);
module_exit(rv3029c2_exit);
module_i2c_driver(rv3029c2_driver);
MODULE_AUTHOR("Gregory Hermant <gregory.hermant@calao-systems.com>");
MODULE_DESCRIPTION("Micro Crystal RV3029C2 RTC driver");
......
......@@ -644,19 +644,8 @@ static struct i2c_driver rx8025_driver = {
.id_table = rx8025_id,
};
static int __init rx8025_init(void)
{
return i2c_add_driver(&rx8025_driver);
}
static void __exit rx8025_exit(void)
{
i2c_del_driver(&rx8025_driver);
}
module_i2c_driver(rx8025_driver);
MODULE_AUTHOR("Wolfgang Grandegger <wg@grandegger.com>");
MODULE_DESCRIPTION("RX-8025 SA/NB RTC driver");
MODULE_LICENSE("GPL");
module_init(rx8025_init);
module_exit(rx8025_exit);
......@@ -276,20 +276,9 @@ static struct i2c_driver rx8581_driver = {
.id_table = rx8581_id,
};
static int __init rx8581_init(void)
{
return i2c_add_driver(&rx8581_driver);
}
static void __exit rx8581_exit(void)
{
i2c_del_driver(&rx8581_driver);
}
module_i2c_driver(rx8581_driver);
MODULE_AUTHOR("Martyn Welch <martyn.welch@ge.com>");
MODULE_DESCRIPTION("Epson RX-8581 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
module_init(rx8581_init);
module_exit(rx8581_exit);
......@@ -304,19 +304,8 @@ static struct i2c_driver s35390a_driver = {
.id_table = s35390a_id,
};
static int __init s35390a_rtc_init(void)
{
return i2c_add_driver(&s35390a_driver);
}
static void __exit s35390a_rtc_exit(void)
{
i2c_del_driver(&s35390a_driver);
}
module_i2c_driver(s35390a_driver);
MODULE_AUTHOR("Byron Bradley <byron.bbradley@gmail.com>");
MODULE_DESCRIPTION("S35390A RTC driver");
MODULE_LICENSE("GPL");
module_init(s35390a_rtc_init);
module_exit(s35390a_rtc_exit);
......@@ -623,15 +623,7 @@ static struct i2c_driver x1205_driver = {
.id_table = x1205_id,
};
static int __init x1205_init(void)
{
return i2c_add_driver(&x1205_driver);
}
static void __exit x1205_exit(void)
{
i2c_del_driver(&x1205_driver);
}
module_i2c_driver(x1205_driver);
MODULE_AUTHOR(
"Karen Spearel <kas111 at gmail dot com>, "
......@@ -639,6 +631,3 @@ MODULE_AUTHOR(
MODULE_DESCRIPTION("Xicor/Intersil X1205 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
module_init(x1205_init);
module_exit(x1205_exit);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment