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: Axel 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user