diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-12 14:32:04 -0500 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2012-01-12 14:32:04 -0500 |
commit | a3664b51c783aaa0dde1c95334d1a670d6d54590 (patch) | |
tree | 6b778b6f222800b761abcba0418a2b8d50718442 /drivers/i2c | |
parent | a699ed6f1f977dcc4a49452a247cf21dc9cec3f9 (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.c | 17 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-au1550.c | 13 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-cpm.c | 13 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-highlander.c | 13 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-ibm_iic.c | 13 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-iop3xx.c | 16 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-isch.c | 13 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-ixp2000.c | 13 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-mpc.c | 13 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-mv64xxx.c | 15 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-ocores.c | 17 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-octeon.c | 16 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-pca-platform.c | 14 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-pmcmsp.c | 17 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-powermac.c | 19 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-sh7760.c | 13 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-simtec.c | 18 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-xiic.c | 18 |
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 */ | ||
299 | MODULE_ALIAS("platform:at91_i2c"); | ||
300 | |||
301 | static struct platform_driver at91_i2c_driver = { | 298 | static 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 | ||
312 | static int __init at91_i2c_init(void) | 309 | module_platform_driver(at91_i2c_driver); |
313 | { | ||
314 | return platform_driver_register(&at91_i2c_driver); | ||
315 | } | ||
316 | |||
317 | static void __exit at91_i2c_exit(void) | ||
318 | { | ||
319 | platform_driver_unregister(&at91_i2c_driver); | ||
320 | } | ||
321 | |||
322 | module_init(at91_i2c_init); | ||
323 | module_exit(at91_i2c_exit); | ||
324 | 310 | ||
325 | MODULE_AUTHOR("Rick Bronson"); | 311 | MODULE_AUTHOR("Rick Bronson"); |
326 | MODULE_DESCRIPTION("I2C (TWI) driver for Atmel AT91"); | 312 | MODULE_DESCRIPTION("I2C (TWI) driver for Atmel AT91"); |
327 | MODULE_LICENSE("GPL"); | 313 | MODULE_LICENSE("GPL"); |
314 | MODULE_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 | ||
429 | static int __init i2c_au1550_init(void) | 429 | module_platform_driver(au1xpsc_smbus_driver); |
430 | { | ||
431 | return platform_driver_register(&au1xpsc_smbus_driver); | ||
432 | } | ||
433 | |||
434 | static void __exit i2c_au1550_exit(void) | ||
435 | { | ||
436 | platform_driver_unregister(&au1xpsc_smbus_driver); | ||
437 | } | ||
438 | 430 | ||
439 | MODULE_AUTHOR("Dan Malek, Embedded Edge, LLC."); | 431 | MODULE_AUTHOR("Dan Malek, Embedded Edge, LLC."); |
440 | MODULE_DESCRIPTION("SMBus adapter Alchemy pb1550"); | 432 | MODULE_DESCRIPTION("SMBus adapter Alchemy pb1550"); |
441 | MODULE_LICENSE("GPL"); | 433 | MODULE_LICENSE("GPL"); |
442 | MODULE_ALIAS("platform:au1xpsc_smbus"); | 434 | MODULE_ALIAS("platform:au1xpsc_smbus"); |
443 | |||
444 | module_init (i2c_au1550_init); | ||
445 | module_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 | ||
727 | static int __init cpm_i2c_init(void) | 727 | module_platform_driver(cpm_i2c_driver); |
728 | { | ||
729 | return platform_driver_register(&cpm_i2c_driver); | ||
730 | } | ||
731 | |||
732 | static void __exit cpm_i2c_exit(void) | ||
733 | { | ||
734 | platform_driver_unregister(&cpm_i2c_driver); | ||
735 | } | ||
736 | |||
737 | module_init(cpm_i2c_init); | ||
738 | module_exit(cpm_i2c_exit); | ||
739 | 728 | ||
740 | MODULE_AUTHOR("Jochen Friedrich <jochen@scram.de>"); | 729 | MODULE_AUTHOR("Jochen Friedrich <jochen@scram.de>"); |
741 | MODULE_DESCRIPTION("I2C-Bus adapter routines for CPM boards"); | 730 | MODULE_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 | ||
471 | static int __init highlander_i2c_init(void) | 471 | module_platform_driver(highlander_i2c_driver); |
472 | { | ||
473 | return platform_driver_register(&highlander_i2c_driver); | ||
474 | } | ||
475 | |||
476 | static void __exit highlander_i2c_exit(void) | ||
477 | { | ||
478 | platform_driver_unregister(&highlander_i2c_driver); | ||
479 | } | ||
480 | |||
481 | module_init(highlander_i2c_init); | ||
482 | module_exit(highlander_i2c_exit); | ||
483 | 472 | ||
484 | MODULE_AUTHOR("Paul Mundt"); | 473 | MODULE_AUTHOR("Paul Mundt"); |
485 | MODULE_DESCRIPTION("Renesas Highlander FPGA I2C/SMBus adapter"); | 474 | MODULE_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 | ||
818 | static int __init iic_init(void) | 818 | module_platform_driver(ibm_iic_driver); |
819 | { | ||
820 | return platform_driver_register(&ibm_iic_driver); | ||
821 | } | ||
822 | |||
823 | static void __exit iic_exit(void) | ||
824 | { | ||
825 | platform_driver_unregister(&ibm_iic_driver); | ||
826 | } | ||
827 | |||
828 | module_init(iic_init); | ||
829 | module_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 | ||
526 | static int __init | 526 | module_platform_driver(iop3xx_i2c_driver); |
527 | i2c_iop3xx_init (void) | ||
528 | { | ||
529 | return platform_driver_register(&iop3xx_i2c_driver); | ||
530 | } | ||
531 | |||
532 | static void __exit | ||
533 | i2c_iop3xx_exit (void) | ||
534 | { | ||
535 | platform_driver_unregister(&iop3xx_i2c_driver); | ||
536 | return; | ||
537 | } | ||
538 | |||
539 | module_init (i2c_iop3xx_init); | ||
540 | module_exit (i2c_iop3xx_exit); | ||
541 | 527 | ||
542 | MODULE_AUTHOR("D-TACQ Solutions Ltd <www.d-tacq.com>"); | 528 | MODULE_AUTHOR("D-TACQ Solutions Ltd <www.d-tacq.com>"); |
543 | MODULE_DESCRIPTION("IOP3xx iic algorithm and driver"); | 529 | MODULE_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 | ||
309 | static int __init i2c_sch_init(void) | 309 | module_platform_driver(smbus_sch_driver); |
310 | { | ||
311 | return platform_driver_register(&smbus_sch_driver); | ||
312 | } | ||
313 | |||
314 | static void __exit i2c_sch_exit(void) | ||
315 | { | ||
316 | platform_driver_unregister(&smbus_sch_driver); | ||
317 | } | ||
318 | 310 | ||
319 | MODULE_AUTHOR("Jacob Pan <jacob.jun.pan@intel.com>"); | 311 | MODULE_AUTHOR("Jacob Pan <jacob.jun.pan@intel.com>"); |
320 | MODULE_DESCRIPTION("Intel SCH SMBus driver"); | 312 | MODULE_DESCRIPTION("Intel SCH SMBus driver"); |
321 | MODULE_LICENSE("GPL"); | 313 | MODULE_LICENSE("GPL"); |
322 | |||
323 | module_init(i2c_sch_init); | ||
324 | module_exit(i2c_sch_exit); | ||
325 | MODULE_ALIAS("platform:isch_smbus"); | 314 | MODULE_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 | ||
151 | static int __init ixp2000_i2c_init(void) | 151 | module_platform_driver(ixp2000_i2c_driver); |
152 | { | ||
153 | return platform_driver_register(&ixp2000_i2c_driver); | ||
154 | } | ||
155 | |||
156 | static void __exit ixp2000_i2c_exit(void) | ||
157 | { | ||
158 | platform_driver_unregister(&ixp2000_i2c_driver); | ||
159 | } | ||
160 | |||
161 | module_init(ixp2000_i2c_init); | ||
162 | module_exit(ixp2000_i2c_exit); | ||
163 | 152 | ||
164 | MODULE_AUTHOR ("Deepak Saxena <dsaxena@plexity.net>"); | 153 | MODULE_AUTHOR ("Deepak Saxena <dsaxena@plexity.net>"); |
165 | MODULE_DESCRIPTION("IXP2000 GPIO-based I2C bus driver"); | 154 | MODULE_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 | ||
718 | static int __init fsl_i2c_init(void) | 718 | module_platform_driver(mpc_i2c_driver); |
719 | { | ||
720 | return platform_driver_register(&mpc_i2c_driver); | ||
721 | } | ||
722 | |||
723 | static void __exit fsl_i2c_exit(void) | ||
724 | { | ||
725 | platform_driver_unregister(&mpc_i2c_driver); | ||
726 | } | ||
727 | |||
728 | module_init(fsl_i2c_init); | ||
729 | module_exit(fsl_i2c_exit); | ||
730 | 719 | ||
731 | MODULE_AUTHOR("Adrian Cox <adrian@humboldt.co.uk>"); | 720 | MODULE_AUTHOR("Adrian Cox <adrian@humboldt.co.uk>"); |
732 | MODULE_DESCRIPTION("I2C-Bus adapter for MPC107 bridge and " | 721 | MODULE_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 | ||
614 | static int __init | 614 | module_platform_driver(mv64xxx_i2c_driver); |
615 | mv64xxx_i2c_init(void) | ||
616 | { | ||
617 | return platform_driver_register(&mv64xxx_i2c_driver); | ||
618 | } | ||
619 | |||
620 | static void __exit | ||
621 | mv64xxx_i2c_exit(void) | ||
622 | { | ||
623 | platform_driver_unregister(&mv64xxx_i2c_driver); | ||
624 | } | ||
625 | |||
626 | module_init(mv64xxx_i2c_init); | ||
627 | module_exit(mv64xxx_i2c_exit); | ||
628 | 615 | ||
629 | MODULE_AUTHOR("Mark A. Greer <mgreer@mvista.com>"); | 616 | MODULE_AUTHOR("Mark A. Greer <mgreer@mvista.com>"); |
630 | MODULE_DESCRIPTION("Marvell mv64xxx host bridge i2c ctlr driver"); | 617 | MODULE_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 | }; |
395 | MODULE_DEVICE_TABLE(of, ocores_i2c_match); | 395 | MODULE_DEVICE_TABLE(of, ocores_i2c_match); |
396 | 396 | ||
397 | /* work with hotplug and coldplug */ | ||
398 | MODULE_ALIAS("platform:ocores-i2c"); | ||
399 | |||
400 | static struct platform_driver ocores_i2c_driver = { | 397 | static 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 | ||
412 | static int __init ocores_i2c_init(void) | 409 | module_platform_driver(ocores_i2c_driver); |
413 | { | ||
414 | return platform_driver_register(&ocores_i2c_driver); | ||
415 | } | ||
416 | |||
417 | static void __exit ocores_i2c_exit(void) | ||
418 | { | ||
419 | platform_driver_unregister(&ocores_i2c_driver); | ||
420 | } | ||
421 | |||
422 | module_init(ocores_i2c_init); | ||
423 | module_exit(ocores_i2c_exit); | ||
424 | 410 | ||
425 | MODULE_AUTHOR("Peter Korsgaard <jacmet@sunsite.dk>"); | 411 | MODULE_AUTHOR("Peter Korsgaard <jacmet@sunsite.dk>"); |
426 | MODULE_DESCRIPTION("OpenCores I2C bus driver"); | 412 | MODULE_DESCRIPTION("OpenCores I2C bus driver"); |
427 | MODULE_LICENSE("GPL"); | 413 | MODULE_LICENSE("GPL"); |
414 | MODULE_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 | ||
632 | static int __init octeon_i2c_init(void) | 632 | module_platform_driver(octeon_i2c_driver); |
633 | { | ||
634 | int rv; | ||
635 | |||
636 | rv = platform_driver_register(&octeon_i2c_driver); | ||
637 | return rv; | ||
638 | } | ||
639 | |||
640 | static void __exit octeon_i2c_exit(void) | ||
641 | { | ||
642 | platform_driver_unregister(&octeon_i2c_driver); | ||
643 | } | ||
644 | 633 | ||
645 | MODULE_AUTHOR("Michael Lawnick <michael.lawnick.ext@nsn.com>"); | 634 | MODULE_AUTHOR("Michael Lawnick <michael.lawnick.ext@nsn.com>"); |
646 | MODULE_DESCRIPTION("I2C-Bus adapter for Cavium OCTEON processors"); | 635 | MODULE_DESCRIPTION("I2C-Bus adapter for Cavium OCTEON processors"); |
647 | MODULE_LICENSE("GPL"); | 636 | MODULE_LICENSE("GPL"); |
648 | MODULE_VERSION(DRV_VERSION); | 637 | MODULE_VERSION(DRV_VERSION); |
649 | MODULE_ALIAS("platform:" DRV_NAME); | 638 | MODULE_ALIAS("platform:" DRV_NAME); |
650 | |||
651 | module_init(octeon_i2c_init); | ||
652 | module_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 | ||
289 | static int __init i2c_pca_pf_init(void) | 289 | module_platform_driver(i2c_pca_pf_driver); |
290 | { | ||
291 | return platform_driver_register(&i2c_pca_pf_driver); | ||
292 | } | ||
293 | |||
294 | static void __exit i2c_pca_pf_exit(void) | ||
295 | { | ||
296 | platform_driver_unregister(&i2c_pca_pf_driver); | ||
297 | } | ||
298 | 290 | ||
299 | MODULE_AUTHOR("Wolfram Sang <w.sang@pengutronix.de>"); | 291 | MODULE_AUTHOR("Wolfram Sang <w.sang@pengutronix.de>"); |
300 | MODULE_DESCRIPTION("I2C-PCA9564/PCA9665 platform driver"); | 292 | MODULE_DESCRIPTION("I2C-PCA9564/PCA9665 platform driver"); |
301 | MODULE_LICENSE("GPL"); | 293 | MODULE_LICENSE("GPL"); |
302 | |||
303 | module_init(i2c_pca_pf_init); | ||
304 | module_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 */ | ||
631 | MODULE_ALIAS("platform:" DRV_NAME); | ||
632 | |||
633 | static struct platform_driver pmcmsptwi_driver = { | 630 | static 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 | ||
642 | static int __init pmcmsptwi_init(void) | 639 | module_platform_driver(pmcmsptwi_driver); |
643 | { | ||
644 | return platform_driver_register(&pmcmsptwi_driver); | ||
645 | } | ||
646 | |||
647 | static void __exit pmcmsptwi_exit(void) | ||
648 | { | ||
649 | platform_driver_unregister(&pmcmsptwi_driver); | ||
650 | } | ||
651 | 640 | ||
652 | MODULE_DESCRIPTION("PMC MSP TWI/SMBus/I2C driver"); | 641 | MODULE_DESCRIPTION("PMC MSP TWI/SMBus/I2C driver"); |
653 | MODULE_LICENSE("GPL"); | 642 | MODULE_LICENSE("GPL"); |
654 | 643 | MODULE_ALIAS("platform:" DRV_NAME); | |
655 | module_init(pmcmsptwi_init); | ||
656 | module_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 */ | ||
317 | MODULE_ALIAS("platform:i2c-powermac"); | ||
318 | |||
319 | static struct platform_driver i2c_powermac_driver = { | 315 | static 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 | ||
328 | static int __init i2c_powermac_init(void) | 324 | module_platform_driver(i2c_powermac_driver); |
329 | { | ||
330 | platform_driver_register(&i2c_powermac_driver); | ||
331 | return 0; | ||
332 | } | ||
333 | 325 | ||
334 | 326 | MODULE_ALIAS("platform:i2c-powermac"); | |
335 | static void __exit i2c_powermac_cleanup(void) | ||
336 | { | ||
337 | platform_driver_unregister(&i2c_powermac_driver); | ||
338 | } | ||
339 | |||
340 | module_init(i2c_powermac_init); | ||
341 | module_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 | ||
563 | static int __init sh7760_i2c_init(void) | 563 | module_platform_driver(sh7760_i2c_drv); |
564 | { | ||
565 | return platform_driver_register(&sh7760_i2c_drv); | ||
566 | } | ||
567 | |||
568 | static void __exit sh7760_i2c_exit(void) | ||
569 | { | ||
570 | platform_driver_unregister(&sh7760_i2c_drv); | ||
571 | } | ||
572 | |||
573 | module_init(sh7760_i2c_init); | ||
574 | module_exit(sh7760_i2c_exit); | ||
575 | 564 | ||
576 | MODULE_LICENSE("GPL"); | 565 | MODULE_LICENSE("GPL"); |
577 | MODULE_DESCRIPTION("SH7760 I2C bus driver"); | 566 | MODULE_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 */ | ||
163 | MODULE_ALIAS("platform:simtec-i2c"); | ||
164 | |||
165 | static struct platform_driver simtec_i2c_driver = { | 161 | static 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 | ||
174 | static int __init i2c_adap_simtec_init(void) | 170 | module_platform_driver(simtec_i2c_driver); |
175 | { | ||
176 | return platform_driver_register(&simtec_i2c_driver); | ||
177 | } | ||
178 | |||
179 | static void __exit i2c_adap_simtec_exit(void) | ||
180 | { | ||
181 | platform_driver_unregister(&simtec_i2c_driver); | ||
182 | } | ||
183 | |||
184 | module_init(i2c_adap_simtec_init); | ||
185 | module_exit(i2c_adap_simtec_exit); | ||
186 | 171 | ||
187 | MODULE_DESCRIPTION("Simtec Generic I2C Bus driver"); | 172 | MODULE_DESCRIPTION("Simtec Generic I2C Bus driver"); |
188 | MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); | 173 | MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); |
189 | MODULE_LICENSE("GPL"); | 174 | MODULE_LICENSE("GPL"); |
175 | MODULE_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 */ | ||
800 | MODULE_ALIAS("platform:"DRIVER_NAME); | ||
801 | |||
802 | static struct platform_driver xiic_i2c_driver = { | 798 | static 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 | ||
811 | static int __init xiic_i2c_init(void) | 807 | module_platform_driver(xiic_i2c_driver); |
812 | { | ||
813 | return platform_driver_register(&xiic_i2c_driver); | ||
814 | } | ||
815 | |||
816 | static void __exit xiic_i2c_exit(void) | ||
817 | { | ||
818 | platform_driver_unregister(&xiic_i2c_driver); | ||
819 | } | ||
820 | |||
821 | module_init(xiic_i2c_init); | ||
822 | module_exit(xiic_i2c_exit); | ||
823 | 808 | ||
824 | MODULE_AUTHOR("info@mocean-labs.com"); | 809 | MODULE_AUTHOR("info@mocean-labs.com"); |
825 | MODULE_DESCRIPTION("Xilinx I2C bus driver"); | 810 | MODULE_DESCRIPTION("Xilinx I2C bus driver"); |
826 | MODULE_LICENSE("GPL v2"); | 811 | MODULE_LICENSE("GPL v2"); |
812 | MODULE_ALIAS("platform:"DRIVER_NAME); | ||