aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-12 14:32:04 -0500
committerJean Delvare <khali@endymion.delvare>2012-01-12 14:32:04 -0500
commita3664b51c783aaa0dde1c95334d1a670d6d54590 (patch)
tree6b778b6f222800b761abcba0418a2b8d50718442 /drivers/i2c
parenta699ed6f1f977dcc4a49452a247cf21dc9cec3f9 (diff)
i2c/busses: Use module_platform_driver()
Convert the drivers in drivers/i2c/busses/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Ben Dooks <ben-linux@fluff.org> Acked-by: Jochen Friedrich <jochen@scram.de> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Manuel Lauss <manuel.lauss@googlemail.com> Cc: Barry Song <21cnbao@gmail.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Yong Zhang <yong.zhang0@gmail.com> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-at91.c17
-rw-r--r--drivers/i2c/busses/i2c-au1550.c13
-rw-r--r--drivers/i2c/busses/i2c-cpm.c13
-rw-r--r--drivers/i2c/busses/i2c-highlander.c13
-rw-r--r--drivers/i2c/busses/i2c-ibm_iic.c13
-rw-r--r--drivers/i2c/busses/i2c-iop3xx.c16
-rw-r--r--drivers/i2c/busses/i2c-isch.c13
-rw-r--r--drivers/i2c/busses/i2c-ixp2000.c13
-rw-r--r--drivers/i2c/busses/i2c-mpc.c13
-rw-r--r--drivers/i2c/busses/i2c-mv64xxx.c15
-rw-r--r--drivers/i2c/busses/i2c-ocores.c17
-rw-r--r--drivers/i2c/busses/i2c-octeon.c16
-rw-r--r--drivers/i2c/busses/i2c-pca-platform.c14
-rw-r--r--drivers/i2c/busses/i2c-pmcmsp.c17
-rw-r--r--drivers/i2c/busses/i2c-powermac.c19
-rw-r--r--drivers/i2c/busses/i2c-sh7760.c13
-rw-r--r--drivers/i2c/busses/i2c-simtec.c18
-rw-r--r--drivers/i2c/busses/i2c-xiic.c18
18 files changed, 24 insertions, 247 deletions
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
index 305c07504f7e..1679deef9c89 100644
--- a/drivers/i2c/busses/i2c-at91.c
+++ b/drivers/i2c/busses/i2c-at91.c
@@ -295,9 +295,6 @@ static int at91_i2c_resume(struct platform_device *pdev)
295#define at91_i2c_resume NULL 295#define at91_i2c_resume NULL
296#endif 296#endif
297 297
298/* work with "modprobe at91_i2c" from hotplugging or coldplugging */
299MODULE_ALIAS("platform:at91_i2c");
300
301static struct platform_driver at91_i2c_driver = { 298static struct platform_driver at91_i2c_driver = {
302 .probe = at91_i2c_probe, 299 .probe = at91_i2c_probe,
303 .remove = __devexit_p(at91_i2c_remove), 300 .remove = __devexit_p(at91_i2c_remove),
@@ -309,19 +306,9 @@ static struct platform_driver at91_i2c_driver = {
309 }, 306 },
310}; 307};
311 308
312static int __init at91_i2c_init(void) 309module_platform_driver(at91_i2c_driver);
313{
314 return platform_driver_register(&at91_i2c_driver);
315}
316
317static void __exit at91_i2c_exit(void)
318{
319 platform_driver_unregister(&at91_i2c_driver);
320}
321
322module_init(at91_i2c_init);
323module_exit(at91_i2c_exit);
324 310
325MODULE_AUTHOR("Rick Bronson"); 311MODULE_AUTHOR("Rick Bronson");
326MODULE_DESCRIPTION("I2C (TWI) driver for Atmel AT91"); 312MODULE_DESCRIPTION("I2C (TWI) driver for Atmel AT91");
327MODULE_LICENSE("GPL"); 313MODULE_LICENSE("GPL");
314MODULE_ALIAS("platform:at91_i2c");
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index f314d7f433d3..582d616db346 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -426,20 +426,9 @@ static struct platform_driver au1xpsc_smbus_driver = {
426 .remove = __devexit_p(i2c_au1550_remove), 426 .remove = __devexit_p(i2c_au1550_remove),
427}; 427};
428 428
429static int __init i2c_au1550_init(void) 429module_platform_driver(au1xpsc_smbus_driver);
430{
431 return platform_driver_register(&au1xpsc_smbus_driver);
432}
433
434static void __exit i2c_au1550_exit(void)
435{
436 platform_driver_unregister(&au1xpsc_smbus_driver);
437}
438 430
439MODULE_AUTHOR("Dan Malek, Embedded Edge, LLC."); 431MODULE_AUTHOR("Dan Malek, Embedded Edge, LLC.");
440MODULE_DESCRIPTION("SMBus adapter Alchemy pb1550"); 432MODULE_DESCRIPTION("SMBus adapter Alchemy pb1550");
441MODULE_LICENSE("GPL"); 433MODULE_LICENSE("GPL");
442MODULE_ALIAS("platform:au1xpsc_smbus"); 434MODULE_ALIAS("platform:au1xpsc_smbus");
443
444module_init (i2c_au1550_init);
445module_exit (i2c_au1550_exit);
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
index b1d9cd28d8da..c1e1096ba069 100644
--- a/drivers/i2c/busses/i2c-cpm.c
+++ b/drivers/i2c/busses/i2c-cpm.c
@@ -724,18 +724,7 @@ static struct platform_driver cpm_i2c_driver = {
724 }, 724 },
725}; 725};
726 726
727static int __init cpm_i2c_init(void) 727module_platform_driver(cpm_i2c_driver);
728{
729 return platform_driver_register(&cpm_i2c_driver);
730}
731
732static void __exit cpm_i2c_exit(void)
733{
734 platform_driver_unregister(&cpm_i2c_driver);
735}
736
737module_init(cpm_i2c_init);
738module_exit(cpm_i2c_exit);
739 728
740MODULE_AUTHOR("Jochen Friedrich <jochen@scram.de>"); 729MODULE_AUTHOR("Jochen Friedrich <jochen@scram.de>");
741MODULE_DESCRIPTION("I2C-Bus adapter routines for CPM boards"); 730MODULE_DESCRIPTION("I2C-Bus adapter routines for CPM boards");
diff --git a/drivers/i2c/busses/i2c-highlander.c b/drivers/i2c/busses/i2c-highlander.c
index 63bb1cc2a042..2294dea6b145 100644
--- a/drivers/i2c/busses/i2c-highlander.c
+++ b/drivers/i2c/busses/i2c-highlander.c
@@ -468,18 +468,7 @@ static struct platform_driver highlander_i2c_driver = {
468 .remove = __devexit_p(highlander_i2c_remove), 468 .remove = __devexit_p(highlander_i2c_remove),
469}; 469};
470 470
471static int __init highlander_i2c_init(void) 471module_platform_driver(highlander_i2c_driver);
472{
473 return platform_driver_register(&highlander_i2c_driver);
474}
475
476static void __exit highlander_i2c_exit(void)
477{
478 platform_driver_unregister(&highlander_i2c_driver);
479}
480
481module_init(highlander_i2c_init);
482module_exit(highlander_i2c_exit);
483 472
484MODULE_AUTHOR("Paul Mundt"); 473MODULE_AUTHOR("Paul Mundt");
485MODULE_DESCRIPTION("Renesas Highlander FPGA I2C/SMBus adapter"); 474MODULE_DESCRIPTION("Renesas Highlander FPGA I2C/SMBus adapter");
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index 3c110fbc409b..dacc5457a1be 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -815,15 +815,4 @@ static struct platform_driver ibm_iic_driver = {
815 .remove = __devexit_p(iic_remove), 815 .remove = __devexit_p(iic_remove),
816}; 816};
817 817
818static int __init iic_init(void) 818module_platform_driver(ibm_iic_driver);
819{
820 return platform_driver_register(&ibm_iic_driver);
821}
822
823static void __exit iic_exit(void)
824{
825 platform_driver_unregister(&ibm_iic_driver);
826}
827
828module_init(iic_init);
829module_exit(iic_exit);
diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c
index f09c9319a2ba..93f147a96b62 100644
--- a/drivers/i2c/busses/i2c-iop3xx.c
+++ b/drivers/i2c/busses/i2c-iop3xx.c
@@ -523,21 +523,7 @@ static struct platform_driver iop3xx_i2c_driver = {
523 }, 523 },
524}; 524};
525 525
526static int __init 526module_platform_driver(iop3xx_i2c_driver);
527i2c_iop3xx_init (void)
528{
529 return platform_driver_register(&iop3xx_i2c_driver);
530}
531
532static void __exit
533i2c_iop3xx_exit (void)
534{
535 platform_driver_unregister(&iop3xx_i2c_driver);
536 return;
537}
538
539module_init (i2c_iop3xx_init);
540module_exit (i2c_iop3xx_exit);
541 527
542MODULE_AUTHOR("D-TACQ Solutions Ltd <www.d-tacq.com>"); 528MODULE_AUTHOR("D-TACQ Solutions Ltd <www.d-tacq.com>");
543MODULE_DESCRIPTION("IOP3xx iic algorithm and driver"); 529MODULE_DESCRIPTION("IOP3xx iic algorithm and driver");
diff --git a/drivers/i2c/busses/i2c-isch.c b/drivers/i2c/busses/i2c-isch.c
index 0682f8f277b0..6561d275b8cf 100644
--- a/drivers/i2c/busses/i2c-isch.c
+++ b/drivers/i2c/busses/i2c-isch.c
@@ -306,20 +306,9 @@ static struct platform_driver smbus_sch_driver = {
306 .remove = __devexit_p(smbus_sch_remove), 306 .remove = __devexit_p(smbus_sch_remove),
307}; 307};
308 308
309static int __init i2c_sch_init(void) 309module_platform_driver(smbus_sch_driver);
310{
311 return platform_driver_register(&smbus_sch_driver);
312}
313
314static void __exit i2c_sch_exit(void)
315{
316 platform_driver_unregister(&smbus_sch_driver);
317}
318 310
319MODULE_AUTHOR("Jacob Pan <jacob.jun.pan@intel.com>"); 311MODULE_AUTHOR("Jacob Pan <jacob.jun.pan@intel.com>");
320MODULE_DESCRIPTION("Intel SCH SMBus driver"); 312MODULE_DESCRIPTION("Intel SCH SMBus driver");
321MODULE_LICENSE("GPL"); 313MODULE_LICENSE("GPL");
322
323module_init(i2c_sch_init);
324module_exit(i2c_sch_exit);
325MODULE_ALIAS("platform:isch_smbus"); 314MODULE_ALIAS("platform:isch_smbus");
diff --git a/drivers/i2c/busses/i2c-ixp2000.c b/drivers/i2c/busses/i2c-ixp2000.c
index c01e9519f6c1..5d263f9014d6 100644
--- a/drivers/i2c/busses/i2c-ixp2000.c
+++ b/drivers/i2c/busses/i2c-ixp2000.c
@@ -148,18 +148,7 @@ static struct platform_driver ixp2000_i2c_driver = {
148 }, 148 },
149}; 149};
150 150
151static int __init ixp2000_i2c_init(void) 151module_platform_driver(ixp2000_i2c_driver);
152{
153 return platform_driver_register(&ixp2000_i2c_driver);
154}
155
156static void __exit ixp2000_i2c_exit(void)
157{
158 platform_driver_unregister(&ixp2000_i2c_driver);
159}
160
161module_init(ixp2000_i2c_init);
162module_exit(ixp2000_i2c_exit);
163 152
164MODULE_AUTHOR ("Deepak Saxena <dsaxena@plexity.net>"); 153MODULE_AUTHOR ("Deepak Saxena <dsaxena@plexity.net>");
165MODULE_DESCRIPTION("IXP2000 GPIO-based I2C bus driver"); 154MODULE_DESCRIPTION("IXP2000 GPIO-based I2C bus driver");
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index 107397a606b4..a8ebb84e23f9 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -715,18 +715,7 @@ static struct platform_driver mpc_i2c_driver = {
715 }, 715 },
716}; 716};
717 717
718static int __init fsl_i2c_init(void) 718module_platform_driver(mpc_i2c_driver);
719{
720 return platform_driver_register(&mpc_i2c_driver);
721}
722
723static void __exit fsl_i2c_exit(void)
724{
725 platform_driver_unregister(&mpc_i2c_driver);
726}
727
728module_init(fsl_i2c_init);
729module_exit(fsl_i2c_exit);
730 719
731MODULE_AUTHOR("Adrian Cox <adrian@humboldt.co.uk>"); 720MODULE_AUTHOR("Adrian Cox <adrian@humboldt.co.uk>");
732MODULE_DESCRIPTION("I2C-Bus adapter for MPC107 bridge and " 721MODULE_DESCRIPTION("I2C-Bus adapter for MPC107 bridge and "
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index a9941c65f226..4f44a33017b0 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -611,20 +611,7 @@ static struct platform_driver mv64xxx_i2c_driver = {
611 }, 611 },
612}; 612};
613 613
614static int __init 614module_platform_driver(mv64xxx_i2c_driver);
615mv64xxx_i2c_init(void)
616{
617 return platform_driver_register(&mv64xxx_i2c_driver);
618}
619
620static void __exit
621mv64xxx_i2c_exit(void)
622{
623 platform_driver_unregister(&mv64xxx_i2c_driver);
624}
625
626module_init(mv64xxx_i2c_init);
627module_exit(mv64xxx_i2c_exit);
628 615
629MODULE_AUTHOR("Mark A. Greer <mgreer@mvista.com>"); 616MODULE_AUTHOR("Mark A. Greer <mgreer@mvista.com>");
630MODULE_DESCRIPTION("Marvell mv64xxx host bridge i2c ctlr driver"); 617MODULE_DESCRIPTION("Marvell mv64xxx host bridge i2c ctlr driver");
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index 1b46a9d9f907..18068dee48f1 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -394,9 +394,6 @@ static struct of_device_id ocores_i2c_match[] = {
394}; 394};
395MODULE_DEVICE_TABLE(of, ocores_i2c_match); 395MODULE_DEVICE_TABLE(of, ocores_i2c_match);
396 396
397/* work with hotplug and coldplug */
398MODULE_ALIAS("platform:ocores-i2c");
399
400static struct platform_driver ocores_i2c_driver = { 397static struct platform_driver ocores_i2c_driver = {
401 .probe = ocores_i2c_probe, 398 .probe = ocores_i2c_probe,
402 .remove = __devexit_p(ocores_i2c_remove), 399 .remove = __devexit_p(ocores_i2c_remove),
@@ -409,19 +406,9 @@ static struct platform_driver ocores_i2c_driver = {
409 }, 406 },
410}; 407};
411 408
412static int __init ocores_i2c_init(void) 409module_platform_driver(ocores_i2c_driver);
413{
414 return platform_driver_register(&ocores_i2c_driver);
415}
416
417static void __exit ocores_i2c_exit(void)
418{
419 platform_driver_unregister(&ocores_i2c_driver);
420}
421
422module_init(ocores_i2c_init);
423module_exit(ocores_i2c_exit);
424 410
425MODULE_AUTHOR("Peter Korsgaard <jacmet@sunsite.dk>"); 411MODULE_AUTHOR("Peter Korsgaard <jacmet@sunsite.dk>");
426MODULE_DESCRIPTION("OpenCores I2C bus driver"); 412MODULE_DESCRIPTION("OpenCores I2C bus driver");
427MODULE_LICENSE("GPL"); 413MODULE_LICENSE("GPL");
414MODULE_ALIAS("platform:ocores-i2c");
diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c
index 56dbe54e8811..ee139a598814 100644
--- a/drivers/i2c/busses/i2c-octeon.c
+++ b/drivers/i2c/busses/i2c-octeon.c
@@ -629,24 +629,10 @@ static struct platform_driver octeon_i2c_driver = {
629 }, 629 },
630}; 630};
631 631
632static int __init octeon_i2c_init(void) 632module_platform_driver(octeon_i2c_driver);
633{
634 int rv;
635
636 rv = platform_driver_register(&octeon_i2c_driver);
637 return rv;
638}
639
640static void __exit octeon_i2c_exit(void)
641{
642 platform_driver_unregister(&octeon_i2c_driver);
643}
644 633
645MODULE_AUTHOR("Michael Lawnick <michael.lawnick.ext@nsn.com>"); 634MODULE_AUTHOR("Michael Lawnick <michael.lawnick.ext@nsn.com>");
646MODULE_DESCRIPTION("I2C-Bus adapter for Cavium OCTEON processors"); 635MODULE_DESCRIPTION("I2C-Bus adapter for Cavium OCTEON processors");
647MODULE_LICENSE("GPL"); 636MODULE_LICENSE("GPL");
648MODULE_VERSION(DRV_VERSION); 637MODULE_VERSION(DRV_VERSION);
649MODULE_ALIAS("platform:" DRV_NAME); 638MODULE_ALIAS("platform:" DRV_NAME);
650
651module_init(octeon_i2c_init);
652module_exit(octeon_i2c_exit);
diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c
index ace67995d7de..2adbf1a8fdea 100644
--- a/drivers/i2c/busses/i2c-pca-platform.c
+++ b/drivers/i2c/busses/i2c-pca-platform.c
@@ -286,20 +286,8 @@ static struct platform_driver i2c_pca_pf_driver = {
286 }, 286 },
287}; 287};
288 288
289static int __init i2c_pca_pf_init(void) 289module_platform_driver(i2c_pca_pf_driver);
290{
291 return platform_driver_register(&i2c_pca_pf_driver);
292}
293
294static void __exit i2c_pca_pf_exit(void)
295{
296 platform_driver_unregister(&i2c_pca_pf_driver);
297}
298 290
299MODULE_AUTHOR("Wolfram Sang <w.sang@pengutronix.de>"); 291MODULE_AUTHOR("Wolfram Sang <w.sang@pengutronix.de>");
300MODULE_DESCRIPTION("I2C-PCA9564/PCA9665 platform driver"); 292MODULE_DESCRIPTION("I2C-PCA9564/PCA9665 platform driver");
301MODULE_LICENSE("GPL"); 293MODULE_LICENSE("GPL");
302
303module_init(i2c_pca_pf_init);
304module_exit(i2c_pca_pf_exit);
305
diff --git a/drivers/i2c/busses/i2c-pmcmsp.c b/drivers/i2c/busses/i2c-pmcmsp.c
index 127051b06921..07b7447ecbc9 100644
--- a/drivers/i2c/busses/i2c-pmcmsp.c
+++ b/drivers/i2c/busses/i2c-pmcmsp.c
@@ -627,9 +627,6 @@ static struct i2c_adapter pmcmsptwi_adapter = {
627 .name = DRV_NAME, 627 .name = DRV_NAME,
628}; 628};
629 629
630/* work with hotplug and coldplug */
631MODULE_ALIAS("platform:" DRV_NAME);
632
633static struct platform_driver pmcmsptwi_driver = { 630static struct platform_driver pmcmsptwi_driver = {
634 .probe = pmcmsptwi_probe, 631 .probe = pmcmsptwi_probe,
635 .remove = __devexit_p(pmcmsptwi_remove), 632 .remove = __devexit_p(pmcmsptwi_remove),
@@ -639,18 +636,8 @@ static struct platform_driver pmcmsptwi_driver = {
639 }, 636 },
640}; 637};
641 638
642static int __init pmcmsptwi_init(void) 639module_platform_driver(pmcmsptwi_driver);
643{
644 return platform_driver_register(&pmcmsptwi_driver);
645}
646
647static void __exit pmcmsptwi_exit(void)
648{
649 platform_driver_unregister(&pmcmsptwi_driver);
650}
651 640
652MODULE_DESCRIPTION("PMC MSP TWI/SMBus/I2C driver"); 641MODULE_DESCRIPTION("PMC MSP TWI/SMBus/I2C driver");
653MODULE_LICENSE("GPL"); 642MODULE_LICENSE("GPL");
654 643MODULE_ALIAS("platform:" DRV_NAME);
655module_init(pmcmsptwi_init);
656module_exit(pmcmsptwi_exit);
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
index b289ec99eeba..7b397c6f607e 100644
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -312,10 +312,6 @@ static int __devinit i2c_powermac_probe(struct platform_device *dev)
312 return rc; 312 return rc;
313} 313}
314 314
315
316/* work with hotplug and coldplug */
317MODULE_ALIAS("platform:i2c-powermac");
318
319static struct platform_driver i2c_powermac_driver = { 315static struct platform_driver i2c_powermac_driver = {
320 .probe = i2c_powermac_probe, 316 .probe = i2c_powermac_probe,
321 .remove = __devexit_p(i2c_powermac_remove), 317 .remove = __devexit_p(i2c_powermac_remove),
@@ -325,17 +321,6 @@ static struct platform_driver i2c_powermac_driver = {
325 }, 321 },
326}; 322};
327 323
328static int __init i2c_powermac_init(void) 324module_platform_driver(i2c_powermac_driver);
329{
330 platform_driver_register(&i2c_powermac_driver);
331 return 0;
332}
333 325
334 326MODULE_ALIAS("platform:i2c-powermac");
335static void __exit i2c_powermac_cleanup(void)
336{
337 platform_driver_unregister(&i2c_powermac_driver);
338}
339
340module_init(i2c_powermac_init);
341module_exit(i2c_powermac_cleanup);
diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c
index a67132b2e092..c0c9dffbdb12 100644
--- a/drivers/i2c/busses/i2c-sh7760.c
+++ b/drivers/i2c/busses/i2c-sh7760.c
@@ -560,18 +560,7 @@ static struct platform_driver sh7760_i2c_drv = {
560 .remove = __devexit_p(sh7760_i2c_remove), 560 .remove = __devexit_p(sh7760_i2c_remove),
561}; 561};
562 562
563static int __init sh7760_i2c_init(void) 563module_platform_driver(sh7760_i2c_drv);
564{
565 return platform_driver_register(&sh7760_i2c_drv);
566}
567
568static void __exit sh7760_i2c_exit(void)
569{
570 platform_driver_unregister(&sh7760_i2c_drv);
571}
572
573module_init(sh7760_i2c_init);
574module_exit(sh7760_i2c_exit);
575 564
576MODULE_LICENSE("GPL"); 565MODULE_LICENSE("GPL");
577MODULE_DESCRIPTION("SH7760 I2C bus driver"); 566MODULE_DESCRIPTION("SH7760 I2C bus driver");
diff --git a/drivers/i2c/busses/i2c-simtec.c b/drivers/i2c/busses/i2c-simtec.c
index 2fc08fbf67a2..4fc87e7c94c9 100644
--- a/drivers/i2c/busses/i2c-simtec.c
+++ b/drivers/i2c/busses/i2c-simtec.c
@@ -156,12 +156,8 @@ static int simtec_i2c_remove(struct platform_device *dev)
156 return 0; 156 return 0;
157} 157}
158 158
159
160/* device driver */ 159/* device driver */
161 160
162/* work with hotplug and coldplug */
163MODULE_ALIAS("platform:simtec-i2c");
164
165static struct platform_driver simtec_i2c_driver = { 161static struct platform_driver simtec_i2c_driver = {
166 .driver = { 162 .driver = {
167 .name = "simtec-i2c", 163 .name = "simtec-i2c",
@@ -171,19 +167,9 @@ static struct platform_driver simtec_i2c_driver = {
171 .remove = simtec_i2c_remove, 167 .remove = simtec_i2c_remove,
172}; 168};
173 169
174static int __init i2c_adap_simtec_init(void) 170module_platform_driver(simtec_i2c_driver);
175{
176 return platform_driver_register(&simtec_i2c_driver);
177}
178
179static void __exit i2c_adap_simtec_exit(void)
180{
181 platform_driver_unregister(&simtec_i2c_driver);
182}
183
184module_init(i2c_adap_simtec_init);
185module_exit(i2c_adap_simtec_exit);
186 171
187MODULE_DESCRIPTION("Simtec Generic I2C Bus driver"); 172MODULE_DESCRIPTION("Simtec Generic I2C Bus driver");
188MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); 173MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
189MODULE_LICENSE("GPL"); 174MODULE_LICENSE("GPL");
175MODULE_ALIAS("platform:simtec-i2c");
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index ac083a28ae08..2bded7647ef2 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -795,10 +795,6 @@ static int __devexit xiic_i2c_remove(struct platform_device* pdev)
795 return 0; 795 return 0;
796} 796}
797 797
798
799/* work with hotplug and coldplug */
800MODULE_ALIAS("platform:"DRIVER_NAME);
801
802static struct platform_driver xiic_i2c_driver = { 798static struct platform_driver xiic_i2c_driver = {
803 .probe = xiic_i2c_probe, 799 .probe = xiic_i2c_probe,
804 .remove = __devexit_p(xiic_i2c_remove), 800 .remove = __devexit_p(xiic_i2c_remove),
@@ -808,19 +804,9 @@ static struct platform_driver xiic_i2c_driver = {
808 }, 804 },
809}; 805};
810 806
811static int __init xiic_i2c_init(void) 807module_platform_driver(xiic_i2c_driver);
812{
813 return platform_driver_register(&xiic_i2c_driver);
814}
815
816static void __exit xiic_i2c_exit(void)
817{
818 platform_driver_unregister(&xiic_i2c_driver);
819}
820
821module_init(xiic_i2c_init);
822module_exit(xiic_i2c_exit);
823 808
824MODULE_AUTHOR("info@mocean-labs.com"); 809MODULE_AUTHOR("info@mocean-labs.com");
825MODULE_DESCRIPTION("Xilinx I2C bus driver"); 810MODULE_DESCRIPTION("Xilinx I2C bus driver");
826MODULE_LICENSE("GPL v2"); 811MODULE_LICENSE("GPL v2");
812MODULE_ALIAS("platform:"DRIVER_NAME);