diff options
Diffstat (limited to 'drivers')
27 files changed, 134 insertions, 148 deletions
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c index d7d8026cde99..2fcac511d39c 100644 --- a/drivers/ata/pata_mpc52xx.c +++ b/drivers/ata/pata_mpc52xx.c | |||
@@ -680,7 +680,7 @@ mpc52xx_ata_remove_one(struct device *dev) | |||
680 | /* ======================================================================== */ | 680 | /* ======================================================================== */ |
681 | 681 | ||
682 | static int __devinit | 682 | static int __devinit |
683 | mpc52xx_ata_probe(struct platform_device *op, const struct of_device_id *match) | 683 | mpc52xx_ata_probe(struct platform_device *op) |
684 | { | 684 | { |
685 | unsigned int ipb_freq; | 685 | unsigned int ipb_freq; |
686 | struct resource res_mem; | 686 | struct resource res_mem; |
@@ -883,7 +883,7 @@ static struct of_device_id mpc52xx_ata_of_match[] = { | |||
883 | }; | 883 | }; |
884 | 884 | ||
885 | 885 | ||
886 | static struct of_platform_driver mpc52xx_ata_of_platform_driver = { | 886 | static struct platform_driver mpc52xx_ata_of_platform_driver = { |
887 | .probe = mpc52xx_ata_probe, | 887 | .probe = mpc52xx_ata_probe, |
888 | .remove = mpc52xx_ata_remove, | 888 | .remove = mpc52xx_ata_remove, |
889 | #ifdef CONFIG_PM | 889 | #ifdef CONFIG_PM |
@@ -906,13 +906,13 @@ static int __init | |||
906 | mpc52xx_ata_init(void) | 906 | mpc52xx_ata_init(void) |
907 | { | 907 | { |
908 | printk(KERN_INFO "ata: MPC52xx IDE/ATA libata driver\n"); | 908 | printk(KERN_INFO "ata: MPC52xx IDE/ATA libata driver\n"); |
909 | return of_register_platform_driver(&mpc52xx_ata_of_platform_driver); | 909 | return platform_driver_register(&mpc52xx_ata_of_platform_driver); |
910 | } | 910 | } |
911 | 911 | ||
912 | static void __exit | 912 | static void __exit |
913 | mpc52xx_ata_exit(void) | 913 | mpc52xx_ata_exit(void) |
914 | { | 914 | { |
915 | of_unregister_platform_driver(&mpc52xx_ata_of_platform_driver); | 915 | platform_driver_unregister(&mpc52xx_ata_of_platform_driver); |
916 | } | 916 | } |
917 | 917 | ||
918 | module_init(mpc52xx_ata_init); | 918 | module_init(mpc52xx_ata_init); |
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c index 480e043ce6b8..f3054009bd25 100644 --- a/drivers/ata/pata_of_platform.c +++ b/drivers/ata/pata_of_platform.c | |||
@@ -14,8 +14,7 @@ | |||
14 | #include <linux/of_platform.h> | 14 | #include <linux/of_platform.h> |
15 | #include <linux/ata_platform.h> | 15 | #include <linux/ata_platform.h> |
16 | 16 | ||
17 | static int __devinit pata_of_platform_probe(struct platform_device *ofdev, | 17 | static int __devinit pata_of_platform_probe(struct platform_device *ofdev) |
18 | const struct of_device_id *match) | ||
19 | { | 18 | { |
20 | int ret; | 19 | int ret; |
21 | struct device_node *dn = ofdev->dev.of_node; | 20 | struct device_node *dn = ofdev->dev.of_node; |
@@ -90,7 +89,7 @@ static struct of_device_id pata_of_platform_match[] = { | |||
90 | }; | 89 | }; |
91 | MODULE_DEVICE_TABLE(of, pata_of_platform_match); | 90 | MODULE_DEVICE_TABLE(of, pata_of_platform_match); |
92 | 91 | ||
93 | static struct of_platform_driver pata_of_platform_driver = { | 92 | static struct platform_driver pata_of_platform_driver = { |
94 | .driver = { | 93 | .driver = { |
95 | .name = "pata_of_platform", | 94 | .name = "pata_of_platform", |
96 | .owner = THIS_MODULE, | 95 | .owner = THIS_MODULE, |
@@ -102,13 +101,13 @@ static struct of_platform_driver pata_of_platform_driver = { | |||
102 | 101 | ||
103 | static int __init pata_of_platform_init(void) | 102 | static int __init pata_of_platform_init(void) |
104 | { | 103 | { |
105 | return of_register_platform_driver(&pata_of_platform_driver); | 104 | return platform_driver_register(&pata_of_platform_driver); |
106 | } | 105 | } |
107 | module_init(pata_of_platform_init); | 106 | module_init(pata_of_platform_init); |
108 | 107 | ||
109 | static void __exit pata_of_platform_exit(void) | 108 | static void __exit pata_of_platform_exit(void) |
110 | { | 109 | { |
111 | of_unregister_platform_driver(&pata_of_platform_driver); | 110 | platform_driver_unregister(&pata_of_platform_driver); |
112 | } | 111 | } |
113 | module_exit(pata_of_platform_exit); | 112 | module_exit(pata_of_platform_exit); |
114 | 113 | ||
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index 6cf57c5c2b5f..685a3a4b4d82 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c | |||
@@ -1588,8 +1588,7 @@ static const struct ata_port_info sata_dwc_port_info[] = { | |||
1588 | }, | 1588 | }, |
1589 | }; | 1589 | }; |
1590 | 1590 | ||
1591 | static int sata_dwc_probe(struct platform_device *ofdev, | 1591 | static int sata_dwc_probe(struct platform_device *ofdev) |
1592 | const struct of_device_id *match) | ||
1593 | { | 1592 | { |
1594 | struct sata_dwc_device *hsdev; | 1593 | struct sata_dwc_device *hsdev; |
1595 | u32 idr, versionr; | 1594 | u32 idr, versionr; |
@@ -1727,7 +1726,7 @@ static const struct of_device_id sata_dwc_match[] = { | |||
1727 | }; | 1726 | }; |
1728 | MODULE_DEVICE_TABLE(of, sata_dwc_match); | 1727 | MODULE_DEVICE_TABLE(of, sata_dwc_match); |
1729 | 1728 | ||
1730 | static struct of_platform_driver sata_dwc_driver = { | 1729 | static struct platform_driver sata_dwc_driver = { |
1731 | .driver = { | 1730 | .driver = { |
1732 | .name = DRV_NAME, | 1731 | .name = DRV_NAME, |
1733 | .owner = THIS_MODULE, | 1732 | .owner = THIS_MODULE, |
@@ -1739,12 +1738,12 @@ static struct of_platform_driver sata_dwc_driver = { | |||
1739 | 1738 | ||
1740 | static int __init sata_dwc_init(void) | 1739 | static int __init sata_dwc_init(void) |
1741 | { | 1740 | { |
1742 | return of_register_platform_driver(&sata_dwc_driver); | 1741 | return platform_driver_register(&sata_dwc_driver); |
1743 | } | 1742 | } |
1744 | 1743 | ||
1745 | static void __exit sata_dwc_exit(void) | 1744 | static void __exit sata_dwc_exit(void) |
1746 | { | 1745 | { |
1747 | of_unregister_platform_driver(&sata_dwc_driver); | 1746 | platform_driver_unregister(&sata_dwc_driver); |
1748 | } | 1747 | } |
1749 | 1748 | ||
1750 | module_init(sata_dwc_init); | 1749 | module_init(sata_dwc_init); |
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index b0214d00d50b..b843e8e9605e 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c | |||
@@ -1293,8 +1293,7 @@ static const struct ata_port_info sata_fsl_port_info[] = { | |||
1293 | }, | 1293 | }, |
1294 | }; | 1294 | }; |
1295 | 1295 | ||
1296 | static int sata_fsl_probe(struct platform_device *ofdev, | 1296 | static int sata_fsl_probe(struct platform_device *ofdev) |
1297 | const struct of_device_id *match) | ||
1298 | { | 1297 | { |
1299 | int retval = -ENXIO; | 1298 | int retval = -ENXIO; |
1300 | void __iomem *hcr_base = NULL; | 1299 | void __iomem *hcr_base = NULL; |
@@ -1423,7 +1422,7 @@ static struct of_device_id fsl_sata_match[] = { | |||
1423 | 1422 | ||
1424 | MODULE_DEVICE_TABLE(of, fsl_sata_match); | 1423 | MODULE_DEVICE_TABLE(of, fsl_sata_match); |
1425 | 1424 | ||
1426 | static struct of_platform_driver fsl_sata_driver = { | 1425 | static struct platform_driver fsl_sata_driver = { |
1427 | .driver = { | 1426 | .driver = { |
1428 | .name = "fsl-sata", | 1427 | .name = "fsl-sata", |
1429 | .owner = THIS_MODULE, | 1428 | .owner = THIS_MODULE, |
@@ -1439,13 +1438,13 @@ static struct of_platform_driver fsl_sata_driver = { | |||
1439 | 1438 | ||
1440 | static int __init sata_fsl_init(void) | 1439 | static int __init sata_fsl_init(void) |
1441 | { | 1440 | { |
1442 | of_register_platform_driver(&fsl_sata_driver); | 1441 | platform_driver_register(&fsl_sata_driver); |
1443 | return 0; | 1442 | return 0; |
1444 | } | 1443 | } |
1445 | 1444 | ||
1446 | static void __exit sata_fsl_exit(void) | 1445 | static void __exit sata_fsl_exit(void) |
1447 | { | 1446 | { |
1448 | of_unregister_platform_driver(&fsl_sata_driver); | 1447 | platform_driver_unregister(&fsl_sata_driver); |
1449 | } | 1448 | } |
1450 | 1449 | ||
1451 | MODULE_LICENSE("GPL"); | 1450 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 44f778507770..bdd2719f3f68 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -2643,14 +2643,17 @@ fore200e_init(struct fore200e* fore200e, struct device *parent) | |||
2643 | } | 2643 | } |
2644 | 2644 | ||
2645 | #ifdef CONFIG_SBUS | 2645 | #ifdef CONFIG_SBUS |
2646 | static int __devinit fore200e_sba_probe(struct platform_device *op, | 2646 | static int __devinit fore200e_sba_probe(struct platform_device *op) |
2647 | const struct of_device_id *match) | ||
2648 | { | 2647 | { |
2649 | const struct fore200e_bus *bus = match->data; | 2648 | const struct fore200e_bus *bus; |
2650 | struct fore200e *fore200e; | 2649 | struct fore200e *fore200e; |
2651 | static int index = 0; | 2650 | static int index = 0; |
2652 | int err; | 2651 | int err; |
2653 | 2652 | ||
2653 | if (!op->dev.of_match) | ||
2654 | return -EINVAL; | ||
2655 | bus = op->dev.of_match->data; | ||
2656 | |||
2654 | fore200e = kzalloc(sizeof(struct fore200e), GFP_KERNEL); | 2657 | fore200e = kzalloc(sizeof(struct fore200e), GFP_KERNEL); |
2655 | if (!fore200e) | 2658 | if (!fore200e) |
2656 | return -ENOMEM; | 2659 | return -ENOMEM; |
@@ -2694,7 +2697,7 @@ static const struct of_device_id fore200e_sba_match[] = { | |||
2694 | }; | 2697 | }; |
2695 | MODULE_DEVICE_TABLE(of, fore200e_sba_match); | 2698 | MODULE_DEVICE_TABLE(of, fore200e_sba_match); |
2696 | 2699 | ||
2697 | static struct of_platform_driver fore200e_sba_driver = { | 2700 | static struct platform_driver fore200e_sba_driver = { |
2698 | .driver = { | 2701 | .driver = { |
2699 | .name = "fore_200e", | 2702 | .name = "fore_200e", |
2700 | .owner = THIS_MODULE, | 2703 | .owner = THIS_MODULE, |
@@ -2795,7 +2798,7 @@ static int __init fore200e_module_init(void) | |||
2795 | printk(FORE200E "FORE Systems 200E-series ATM driver - version " FORE200E_VERSION "\n"); | 2798 | printk(FORE200E "FORE Systems 200E-series ATM driver - version " FORE200E_VERSION "\n"); |
2796 | 2799 | ||
2797 | #ifdef CONFIG_SBUS | 2800 | #ifdef CONFIG_SBUS |
2798 | err = of_register_platform_driver(&fore200e_sba_driver); | 2801 | err = platform_driver_register(&fore200e_sba_driver); |
2799 | if (err) | 2802 | if (err) |
2800 | return err; | 2803 | return err; |
2801 | #endif | 2804 | #endif |
@@ -2806,7 +2809,7 @@ static int __init fore200e_module_init(void) | |||
2806 | 2809 | ||
2807 | #ifdef CONFIG_SBUS | 2810 | #ifdef CONFIG_SBUS |
2808 | if (err) | 2811 | if (err) |
2809 | of_unregister_platform_driver(&fore200e_sba_driver); | 2812 | platform_driver_unregister(&fore200e_sba_driver); |
2810 | #endif | 2813 | #endif |
2811 | 2814 | ||
2812 | return err; | 2815 | return err; |
@@ -2818,7 +2821,7 @@ static void __exit fore200e_module_cleanup(void) | |||
2818 | pci_unregister_driver(&fore200e_pca_driver); | 2821 | pci_unregister_driver(&fore200e_pca_driver); |
2819 | #endif | 2822 | #endif |
2820 | #ifdef CONFIG_SBUS | 2823 | #ifdef CONFIG_SBUS |
2821 | of_unregister_platform_driver(&fore200e_sba_driver); | 2824 | platform_driver_unregister(&fore200e_sba_driver); |
2822 | #endif | 2825 | #endif |
2823 | } | 2826 | } |
2824 | 2827 | ||
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index 829161edae53..2c590a796aa1 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c | |||
@@ -1195,16 +1195,13 @@ static struct platform_driver ace_platform_driver = { | |||
1195 | */ | 1195 | */ |
1196 | 1196 | ||
1197 | #if defined(CONFIG_OF) | 1197 | #if defined(CONFIG_OF) |
1198 | static int __devinit | 1198 | static int __devinit ace_of_probe(struct platform_device *op) |
1199 | ace_of_probe(struct platform_device *op, const struct of_device_id *match) | ||
1200 | { | 1199 | { |
1201 | struct resource res; | 1200 | struct resource res; |
1202 | resource_size_t physaddr; | 1201 | resource_size_t physaddr; |
1203 | const u32 *id; | 1202 | const u32 *id; |
1204 | int irq, bus_width, rc; | 1203 | int irq, bus_width, rc; |
1205 | 1204 | ||
1206 | dev_dbg(&op->dev, "ace_of_probe(%p, %p)\n", op, match); | ||
1207 | |||
1208 | /* device id */ | 1205 | /* device id */ |
1209 | id = of_get_property(op->dev.of_node, "port-number", NULL); | 1206 | id = of_get_property(op->dev.of_node, "port-number", NULL); |
1210 | 1207 | ||
@@ -1245,7 +1242,7 @@ static const struct of_device_id ace_of_match[] __devinitconst = { | |||
1245 | }; | 1242 | }; |
1246 | MODULE_DEVICE_TABLE(of, ace_of_match); | 1243 | MODULE_DEVICE_TABLE(of, ace_of_match); |
1247 | 1244 | ||
1248 | static struct of_platform_driver ace_of_driver = { | 1245 | static struct platform_driver ace_of_driver = { |
1249 | .probe = ace_of_probe, | 1246 | .probe = ace_of_probe, |
1250 | .remove = __devexit_p(ace_of_remove), | 1247 | .remove = __devexit_p(ace_of_remove), |
1251 | .driver = { | 1248 | .driver = { |
@@ -1259,12 +1256,12 @@ static struct of_platform_driver ace_of_driver = { | |||
1259 | static inline int __init ace_of_register(void) | 1256 | static inline int __init ace_of_register(void) |
1260 | { | 1257 | { |
1261 | pr_debug("xsysace: registering OF binding\n"); | 1258 | pr_debug("xsysace: registering OF binding\n"); |
1262 | return of_register_platform_driver(&ace_of_driver); | 1259 | return platform_driver_register(&ace_of_driver); |
1263 | } | 1260 | } |
1264 | 1261 | ||
1265 | static inline void __exit ace_of_unregister(void) | 1262 | static inline void __exit ace_of_unregister(void) |
1266 | { | 1263 | { |
1267 | of_unregister_platform_driver(&ace_of_driver); | 1264 | platform_driver_unregister(&ace_of_driver); |
1268 | } | 1265 | } |
1269 | #else /* CONFIG_OF */ | 1266 | #else /* CONFIG_OF */ |
1270 | /* CONFIG_OF not enabled; do nothing helpers */ | 1267 | /* CONFIG_OF not enabled; do nothing helpers */ |
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index b879c3f5d7c0..854e2632f9a6 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c | |||
@@ -2402,8 +2402,7 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev, | |||
2402 | return t_alg; | 2402 | return t_alg; |
2403 | } | 2403 | } |
2404 | 2404 | ||
2405 | static int talitos_probe(struct platform_device *ofdev, | 2405 | static int talitos_probe(struct platform_device *ofdev) |
2406 | const struct of_device_id *match) | ||
2407 | { | 2406 | { |
2408 | struct device *dev = &ofdev->dev; | 2407 | struct device *dev = &ofdev->dev; |
2409 | struct device_node *np = ofdev->dev.of_node; | 2408 | struct device_node *np = ofdev->dev.of_node; |
@@ -2580,7 +2579,7 @@ static const struct of_device_id talitos_match[] = { | |||
2580 | }; | 2579 | }; |
2581 | MODULE_DEVICE_TABLE(of, talitos_match); | 2580 | MODULE_DEVICE_TABLE(of, talitos_match); |
2582 | 2581 | ||
2583 | static struct of_platform_driver talitos_driver = { | 2582 | static struct platform_driver talitos_driver = { |
2584 | .driver = { | 2583 | .driver = { |
2585 | .name = "talitos", | 2584 | .name = "talitos", |
2586 | .owner = THIS_MODULE, | 2585 | .owner = THIS_MODULE, |
@@ -2592,13 +2591,13 @@ static struct of_platform_driver talitos_driver = { | |||
2592 | 2591 | ||
2593 | static int __init talitos_init(void) | 2592 | static int __init talitos_init(void) |
2594 | { | 2593 | { |
2595 | return of_register_platform_driver(&talitos_driver); | 2594 | return platform_driver_register(&talitos_driver); |
2596 | } | 2595 | } |
2597 | module_init(talitos_init); | 2596 | module_init(talitos_init); |
2598 | 2597 | ||
2599 | static void __exit talitos_exit(void) | 2598 | static void __exit talitos_exit(void) |
2600 | { | 2599 | { |
2601 | of_unregister_platform_driver(&talitos_driver); | 2600 | platform_driver_unregister(&talitos_driver); |
2602 | } | 2601 | } |
2603 | module_exit(talitos_exit); | 2602 | module_exit(talitos_exit); |
2604 | 2603 | ||
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index f2de3be35df3..3a20961bef1e 100644 --- a/drivers/i2c/busses/i2c-cpm.c +++ b/drivers/i2c/busses/i2c-cpm.c | |||
@@ -634,8 +634,7 @@ static void cpm_i2c_shutdown(struct cpm_i2c *cpm) | |||
634 | cpm_muram_free(cpm->i2c_addr); | 634 | cpm_muram_free(cpm->i2c_addr); |
635 | } | 635 | } |
636 | 636 | ||
637 | static int __devinit cpm_i2c_probe(struct platform_device *ofdev, | 637 | static int __devinit cpm_i2c_probe(struct platform_device *ofdev) |
638 | const struct of_device_id *match) | ||
639 | { | 638 | { |
640 | int result, len; | 639 | int result, len; |
641 | struct cpm_i2c *cpm; | 640 | struct cpm_i2c *cpm; |
@@ -718,7 +717,7 @@ static const struct of_device_id cpm_i2c_match[] = { | |||
718 | 717 | ||
719 | MODULE_DEVICE_TABLE(of, cpm_i2c_match); | 718 | MODULE_DEVICE_TABLE(of, cpm_i2c_match); |
720 | 719 | ||
721 | static struct of_platform_driver cpm_i2c_driver = { | 720 | static struct platform_driver cpm_i2c_driver = { |
722 | .probe = cpm_i2c_probe, | 721 | .probe = cpm_i2c_probe, |
723 | .remove = __devexit_p(cpm_i2c_remove), | 722 | .remove = __devexit_p(cpm_i2c_remove), |
724 | .driver = { | 723 | .driver = { |
@@ -730,12 +729,12 @@ static struct of_platform_driver cpm_i2c_driver = { | |||
730 | 729 | ||
731 | static int __init cpm_i2c_init(void) | 730 | static int __init cpm_i2c_init(void) |
732 | { | 731 | { |
733 | return of_register_platform_driver(&cpm_i2c_driver); | 732 | return platform_driver_register(&cpm_i2c_driver); |
734 | } | 733 | } |
735 | 734 | ||
736 | static void __exit cpm_i2c_exit(void) | 735 | static void __exit cpm_i2c_exit(void) |
737 | { | 736 | { |
738 | of_unregister_platform_driver(&cpm_i2c_driver); | 737 | platform_driver_unregister(&cpm_i2c_driver); |
739 | } | 738 | } |
740 | 739 | ||
741 | module_init(cpm_i2c_init); | 740 | module_init(cpm_i2c_init); |
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index 6e3c38240336..e4f88dca99b5 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c | |||
@@ -691,8 +691,7 @@ static int __devinit iic_request_irq(struct platform_device *ofdev, | |||
691 | /* | 691 | /* |
692 | * Register single IIC interface | 692 | * Register single IIC interface |
693 | */ | 693 | */ |
694 | static int __devinit iic_probe(struct platform_device *ofdev, | 694 | static int __devinit iic_probe(struct platform_device *ofdev) |
695 | const struct of_device_id *match) | ||
696 | { | 695 | { |
697 | struct device_node *np = ofdev->dev.of_node; | 696 | struct device_node *np = ofdev->dev.of_node; |
698 | struct ibm_iic_private *dev; | 697 | struct ibm_iic_private *dev; |
@@ -806,7 +805,7 @@ static const struct of_device_id ibm_iic_match[] = { | |||
806 | {} | 805 | {} |
807 | }; | 806 | }; |
808 | 807 | ||
809 | static struct of_platform_driver ibm_iic_driver = { | 808 | static struct platform_driver ibm_iic_driver = { |
810 | .driver = { | 809 | .driver = { |
811 | .name = "ibm-iic", | 810 | .name = "ibm-iic", |
812 | .owner = THIS_MODULE, | 811 | .owner = THIS_MODULE, |
@@ -818,12 +817,12 @@ static struct of_platform_driver ibm_iic_driver = { | |||
818 | 817 | ||
819 | static int __init iic_init(void) | 818 | static int __init iic_init(void) |
820 | { | 819 | { |
821 | return of_register_platform_driver(&ibm_iic_driver); | 820 | return platform_driver_register(&ibm_iic_driver); |
822 | } | 821 | } |
823 | 822 | ||
824 | static void __exit iic_exit(void) | 823 | static void __exit iic_exit(void) |
825 | { | 824 | { |
826 | of_unregister_platform_driver(&ibm_iic_driver); | 825 | platform_driver_unregister(&ibm_iic_driver); |
827 | } | 826 | } |
828 | 827 | ||
829 | module_init(iic_init); | 828 | module_init(iic_init); |
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index b74e6dc6886c..75b984c519ac 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c | |||
@@ -560,8 +560,7 @@ static struct i2c_adapter mpc_ops = { | |||
560 | .timeout = HZ, | 560 | .timeout = HZ, |
561 | }; | 561 | }; |
562 | 562 | ||
563 | static int __devinit fsl_i2c_probe(struct platform_device *op, | 563 | static int __devinit fsl_i2c_probe(struct platform_device *op) |
564 | const struct of_device_id *match) | ||
565 | { | 564 | { |
566 | struct mpc_i2c *i2c; | 565 | struct mpc_i2c *i2c; |
567 | const u32 *prop; | 566 | const u32 *prop; |
@@ -569,6 +568,9 @@ static int __devinit fsl_i2c_probe(struct platform_device *op, | |||
569 | int result = 0; | 568 | int result = 0; |
570 | int plen; | 569 | int plen; |
571 | 570 | ||
571 | if (!op->dev.of_match) | ||
572 | return -EINVAL; | ||
573 | |||
572 | i2c = kzalloc(sizeof(*i2c), GFP_KERNEL); | 574 | i2c = kzalloc(sizeof(*i2c), GFP_KERNEL); |
573 | if (!i2c) | 575 | if (!i2c) |
574 | return -ENOMEM; | 576 | return -ENOMEM; |
@@ -603,8 +605,8 @@ static int __devinit fsl_i2c_probe(struct platform_device *op, | |||
603 | clock = *prop; | 605 | clock = *prop; |
604 | } | 606 | } |
605 | 607 | ||
606 | if (match->data) { | 608 | if (op->dev.of_match->data) { |
607 | struct mpc_i2c_data *data = match->data; | 609 | struct mpc_i2c_data *data = op->dev.of_match->data; |
608 | data->setup(op->dev.of_node, i2c, clock, data->prescaler); | 610 | data->setup(op->dev.of_node, i2c, clock, data->prescaler); |
609 | } else { | 611 | } else { |
610 | /* Backwards compatibility */ | 612 | /* Backwards compatibility */ |
@@ -700,7 +702,7 @@ static const struct of_device_id mpc_i2c_of_match[] = { | |||
700 | MODULE_DEVICE_TABLE(of, mpc_i2c_of_match); | 702 | MODULE_DEVICE_TABLE(of, mpc_i2c_of_match); |
701 | 703 | ||
702 | /* Structure for a device driver */ | 704 | /* Structure for a device driver */ |
703 | static struct of_platform_driver mpc_i2c_driver = { | 705 | static struct platform_driver mpc_i2c_driver = { |
704 | .probe = fsl_i2c_probe, | 706 | .probe = fsl_i2c_probe, |
705 | .remove = __devexit_p(fsl_i2c_remove), | 707 | .remove = __devexit_p(fsl_i2c_remove), |
706 | .driver = { | 708 | .driver = { |
@@ -712,18 +714,12 @@ static struct of_platform_driver mpc_i2c_driver = { | |||
712 | 714 | ||
713 | static int __init fsl_i2c_init(void) | 715 | static int __init fsl_i2c_init(void) |
714 | { | 716 | { |
715 | int rv; | 717 | return platform_driver_register(&mpc_i2c_driver); |
716 | |||
717 | rv = of_register_platform_driver(&mpc_i2c_driver); | ||
718 | if (rv) | ||
719 | printk(KERN_ERR DRV_NAME | ||
720 | " of_register_platform_driver failed (%i)\n", rv); | ||
721 | return rv; | ||
722 | } | 718 | } |
723 | 719 | ||
724 | static void __exit fsl_i2c_exit(void) | 720 | static void __exit fsl_i2c_exit(void) |
725 | { | 721 | { |
726 | of_unregister_platform_driver(&mpc_i2c_driver); | 722 | platform_driver_unregister(&mpc_i2c_driver); |
727 | } | 723 | } |
728 | 724 | ||
729 | module_init(fsl_i2c_init); | 725 | module_init(fsl_i2c_init); |
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index bb14449fb022..7540bafc95cf 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c | |||
@@ -232,8 +232,7 @@ static void sxps2_close(struct serio *pserio) | |||
232 | * It returns 0, if the driver is bound to the PS/2 device, or a negative | 232 | * It returns 0, if the driver is bound to the PS/2 device, or a negative |
233 | * value if there is an error. | 233 | * value if there is an error. |
234 | */ | 234 | */ |
235 | static int __devinit xps2_of_probe(struct platform_device *ofdev, | 235 | static int __devinit xps2_of_probe(struct platform_device *ofdev) |
236 | const struct of_device_id *match) | ||
237 | { | 236 | { |
238 | struct resource r_irq; /* Interrupt resources */ | 237 | struct resource r_irq; /* Interrupt resources */ |
239 | struct resource r_mem; /* IO mem resources */ | 238 | struct resource r_mem; /* IO mem resources */ |
@@ -361,7 +360,7 @@ static const struct of_device_id xps2_of_match[] __devinitconst = { | |||
361 | }; | 360 | }; |
362 | MODULE_DEVICE_TABLE(of, xps2_of_match); | 361 | MODULE_DEVICE_TABLE(of, xps2_of_match); |
363 | 362 | ||
364 | static struct of_platform_driver xps2_of_driver = { | 363 | static struct platform_driver xps2_of_driver = { |
365 | .driver = { | 364 | .driver = { |
366 | .name = DRIVER_NAME, | 365 | .name = DRIVER_NAME, |
367 | .owner = THIS_MODULE, | 366 | .owner = THIS_MODULE, |
@@ -373,12 +372,12 @@ static struct of_platform_driver xps2_of_driver = { | |||
373 | 372 | ||
374 | static int __init xps2_init(void) | 373 | static int __init xps2_init(void) |
375 | { | 374 | { |
376 | return of_register_platform_driver(&xps2_of_driver); | 375 | return platform_driver_register(&xps2_of_driver); |
377 | } | 376 | } |
378 | 377 | ||
379 | static void __exit xps2_cleanup(void) | 378 | static void __exit xps2_cleanup(void) |
380 | { | 379 | { |
381 | of_unregister_platform_driver(&xps2_of_driver); | 380 | platform_driver_unregister(&xps2_of_driver); |
382 | } | 381 | } |
383 | 382 | ||
384 | module_init(xps2_init); | 383 | module_init(xps2_init); |
diff --git a/drivers/media/video/fsl-viu.c b/drivers/media/video/fsl-viu.c index e4bba88254c7..031af1610154 100644 --- a/drivers/media/video/fsl-viu.c +++ b/drivers/media/video/fsl-viu.c | |||
@@ -1445,8 +1445,7 @@ static struct video_device viu_template = { | |||
1445 | .current_norm = V4L2_STD_NTSC_M, | 1445 | .current_norm = V4L2_STD_NTSC_M, |
1446 | }; | 1446 | }; |
1447 | 1447 | ||
1448 | static int __devinit viu_of_probe(struct platform_device *op, | 1448 | static int __devinit viu_of_probe(struct platform_device *op) |
1449 | const struct of_device_id *match) | ||
1450 | { | 1449 | { |
1451 | struct viu_dev *viu_dev; | 1450 | struct viu_dev *viu_dev; |
1452 | struct video_device *vdev; | 1451 | struct video_device *vdev; |
@@ -1627,7 +1626,7 @@ static struct of_device_id mpc512x_viu_of_match[] = { | |||
1627 | }; | 1626 | }; |
1628 | MODULE_DEVICE_TABLE(of, mpc512x_viu_of_match); | 1627 | MODULE_DEVICE_TABLE(of, mpc512x_viu_of_match); |
1629 | 1628 | ||
1630 | static struct of_platform_driver viu_of_platform_driver = { | 1629 | static struct platform_driver viu_of_platform_driver = { |
1631 | .probe = viu_of_probe, | 1630 | .probe = viu_of_probe, |
1632 | .remove = __devexit_p(viu_of_remove), | 1631 | .remove = __devexit_p(viu_of_remove), |
1633 | #ifdef CONFIG_PM | 1632 | #ifdef CONFIG_PM |
@@ -1643,12 +1642,12 @@ static struct of_platform_driver viu_of_platform_driver = { | |||
1643 | 1642 | ||
1644 | static int __init viu_init(void) | 1643 | static int __init viu_init(void) |
1645 | { | 1644 | { |
1646 | return of_register_platform_driver(&viu_of_platform_driver); | 1645 | return platform_driver_register(&viu_of_platform_driver); |
1647 | } | 1646 | } |
1648 | 1647 | ||
1649 | static void __exit viu_exit(void) | 1648 | static void __exit viu_exit(void) |
1650 | { | 1649 | { |
1651 | of_unregister_platform_driver(&viu_of_platform_driver); | 1650 | platform_driver_unregister(&viu_of_platform_driver); |
1652 | } | 1651 | } |
1653 | 1652 | ||
1654 | module_init(viu_init); | 1653 | module_init(viu_init); |
diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c index dd84124f4209..f9b611fc773e 100644 --- a/drivers/mmc/host/sdhci-of-core.c +++ b/drivers/mmc/host/sdhci-of-core.c | |||
@@ -124,17 +124,20 @@ static bool __devinit sdhci_of_wp_inverted(struct device_node *np) | |||
124 | #endif | 124 | #endif |
125 | } | 125 | } |
126 | 126 | ||
127 | static int __devinit sdhci_of_probe(struct platform_device *ofdev, | 127 | static int __devinit sdhci_of_probe(struct platform_device *ofdev) |
128 | const struct of_device_id *match) | ||
129 | { | 128 | { |
130 | struct device_node *np = ofdev->dev.of_node; | 129 | struct device_node *np = ofdev->dev.of_node; |
131 | struct sdhci_of_data *sdhci_of_data = match->data; | 130 | struct sdhci_of_data *sdhci_of_data; |
132 | struct sdhci_host *host; | 131 | struct sdhci_host *host; |
133 | struct sdhci_of_host *of_host; | 132 | struct sdhci_of_host *of_host; |
134 | const __be32 *clk; | 133 | const __be32 *clk; |
135 | int size; | 134 | int size; |
136 | int ret; | 135 | int ret; |
137 | 136 | ||
137 | if (!ofdev->dev.of_match) | ||
138 | return -EINVAL; | ||
139 | sdhci_of_data = ofdev->dev.of_match->data; | ||
140 | |||
138 | if (!of_device_is_available(np)) | 141 | if (!of_device_is_available(np)) |
139 | return -ENODEV; | 142 | return -ENODEV; |
140 | 143 | ||
@@ -217,7 +220,7 @@ static const struct of_device_id sdhci_of_match[] = { | |||
217 | }; | 220 | }; |
218 | MODULE_DEVICE_TABLE(of, sdhci_of_match); | 221 | MODULE_DEVICE_TABLE(of, sdhci_of_match); |
219 | 222 | ||
220 | static struct of_platform_driver sdhci_of_driver = { | 223 | static struct platform_driver sdhci_of_driver = { |
221 | .driver = { | 224 | .driver = { |
222 | .name = "sdhci-of", | 225 | .name = "sdhci-of", |
223 | .owner = THIS_MODULE, | 226 | .owner = THIS_MODULE, |
@@ -231,13 +234,13 @@ static struct of_platform_driver sdhci_of_driver = { | |||
231 | 234 | ||
232 | static int __init sdhci_of_init(void) | 235 | static int __init sdhci_of_init(void) |
233 | { | 236 | { |
234 | return of_register_platform_driver(&sdhci_of_driver); | 237 | return platform_driver_register(&sdhci_of_driver); |
235 | } | 238 | } |
236 | module_init(sdhci_of_init); | 239 | module_init(sdhci_of_init); |
237 | 240 | ||
238 | static void __exit sdhci_of_exit(void) | 241 | static void __exit sdhci_of_exit(void) |
239 | { | 242 | { |
240 | of_unregister_platform_driver(&sdhci_of_driver); | 243 | platform_driver_unregister(&sdhci_of_driver); |
241 | } | 244 | } |
242 | module_exit(sdhci_of_exit); | 245 | module_exit(sdhci_of_exit); |
243 | 246 | ||
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 8506578e6a35..3db0cb083d31 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
@@ -216,8 +216,7 @@ static void __devinit of_free_probes(const char **probes) | |||
216 | } | 216 | } |
217 | #endif | 217 | #endif |
218 | 218 | ||
219 | static int __devinit of_flash_probe(struct platform_device *dev, | 219 | static int __devinit of_flash_probe(struct platform_device *dev) |
220 | const struct of_device_id *match) | ||
221 | { | 220 | { |
222 | #ifdef CONFIG_MTD_PARTITIONS | 221 | #ifdef CONFIG_MTD_PARTITIONS |
223 | const char **part_probe_types; | 222 | const char **part_probe_types; |
@@ -225,7 +224,7 @@ static int __devinit of_flash_probe(struct platform_device *dev, | |||
225 | struct device_node *dp = dev->dev.of_node; | 224 | struct device_node *dp = dev->dev.of_node; |
226 | struct resource res; | 225 | struct resource res; |
227 | struct of_flash *info; | 226 | struct of_flash *info; |
228 | const char *probe_type = match->data; | 227 | const char *probe_type; |
229 | const __be32 *width; | 228 | const __be32 *width; |
230 | int err; | 229 | int err; |
231 | int i; | 230 | int i; |
@@ -235,6 +234,10 @@ static int __devinit of_flash_probe(struct platform_device *dev, | |||
235 | struct mtd_info **mtd_list = NULL; | 234 | struct mtd_info **mtd_list = NULL; |
236 | resource_size_t res_size; | 235 | resource_size_t res_size; |
237 | 236 | ||
237 | if (!dev->dev.of_match) | ||
238 | return -EINVAL; | ||
239 | probe_type = dev->dev.of_match->data; | ||
240 | |||
238 | reg_tuple_size = (of_n_addr_cells(dp) + of_n_size_cells(dp)) * sizeof(u32); | 241 | reg_tuple_size = (of_n_addr_cells(dp) + of_n_size_cells(dp)) * sizeof(u32); |
239 | 242 | ||
240 | /* | 243 | /* |
@@ -418,7 +421,7 @@ static struct of_device_id of_flash_match[] = { | |||
418 | }; | 421 | }; |
419 | MODULE_DEVICE_TABLE(of, of_flash_match); | 422 | MODULE_DEVICE_TABLE(of, of_flash_match); |
420 | 423 | ||
421 | static struct of_platform_driver of_flash_driver = { | 424 | static struct platform_driver of_flash_driver = { |
422 | .driver = { | 425 | .driver = { |
423 | .name = "of-flash", | 426 | .name = "of-flash", |
424 | .owner = THIS_MODULE, | 427 | .owner = THIS_MODULE, |
@@ -430,12 +433,12 @@ static struct of_platform_driver of_flash_driver = { | |||
430 | 433 | ||
431 | static int __init of_flash_init(void) | 434 | static int __init of_flash_init(void) |
432 | { | 435 | { |
433 | return of_register_platform_driver(&of_flash_driver); | 436 | return platform_driver_register(&of_flash_driver); |
434 | } | 437 | } |
435 | 438 | ||
436 | static void __exit of_flash_exit(void) | 439 | static void __exit of_flash_exit(void) |
437 | { | 440 | { |
438 | of_unregister_platform_driver(&of_flash_driver); | 441 | platform_driver_unregister(&of_flash_driver); |
439 | } | 442 | } |
440 | 443 | ||
441 | module_init(of_flash_init); | 444 | module_init(of_flash_init); |
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index 3582ba1f9b09..3f1cb328a574 100644 --- a/drivers/mtd/maps/sun_uflash.c +++ b/drivers/mtd/maps/sun_uflash.c | |||
@@ -108,7 +108,7 @@ int uflash_devinit(struct platform_device *op, struct device_node *dp) | |||
108 | return 0; | 108 | return 0; |
109 | } | 109 | } |
110 | 110 | ||
111 | static int __devinit uflash_probe(struct platform_device *op, const struct of_device_id *match) | 111 | static int __devinit uflash_probe(struct platform_device *op) |
112 | { | 112 | { |
113 | struct device_node *dp = op->dev.of_node; | 113 | struct device_node *dp = op->dev.of_node; |
114 | 114 | ||
@@ -148,7 +148,7 @@ static const struct of_device_id uflash_match[] = { | |||
148 | 148 | ||
149 | MODULE_DEVICE_TABLE(of, uflash_match); | 149 | MODULE_DEVICE_TABLE(of, uflash_match); |
150 | 150 | ||
151 | static struct of_platform_driver uflash_driver = { | 151 | static struct platform_driver uflash_driver = { |
152 | .driver = { | 152 | .driver = { |
153 | .name = DRIVER_NAME, | 153 | .name = DRIVER_NAME, |
154 | .owner = THIS_MODULE, | 154 | .owner = THIS_MODULE, |
@@ -160,12 +160,12 @@ static struct of_platform_driver uflash_driver = { | |||
160 | 160 | ||
161 | static int __init uflash_init(void) | 161 | static int __init uflash_init(void) |
162 | { | 162 | { |
163 | return of_register_platform_driver(&uflash_driver); | 163 | return platform_driver_register(&uflash_driver); |
164 | } | 164 | } |
165 | 165 | ||
166 | static void __exit uflash_exit(void) | 166 | static void __exit uflash_exit(void) |
167 | { | 167 | { |
168 | of_unregister_platform_driver(&uflash_driver); | 168 | platform_driver_unregister(&uflash_driver); |
169 | } | 169 | } |
170 | 170 | ||
171 | module_init(uflash_init); | 171 | module_init(uflash_init); |
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index efdcca94ce55..073ee026a17c 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c | |||
@@ -217,8 +217,7 @@ err: | |||
217 | return ret; | 217 | return ret; |
218 | } | 218 | } |
219 | 219 | ||
220 | static int __devinit fun_probe(struct platform_device *ofdev, | 220 | static int __devinit fun_probe(struct platform_device *ofdev) |
221 | const struct of_device_id *ofid) | ||
222 | { | 221 | { |
223 | struct fsl_upm_nand *fun; | 222 | struct fsl_upm_nand *fun; |
224 | struct resource io_res; | 223 | struct resource io_res; |
@@ -360,7 +359,7 @@ static const struct of_device_id of_fun_match[] = { | |||
360 | }; | 359 | }; |
361 | MODULE_DEVICE_TABLE(of, of_fun_match); | 360 | MODULE_DEVICE_TABLE(of, of_fun_match); |
362 | 361 | ||
363 | static struct of_platform_driver of_fun_driver = { | 362 | static struct platform_driver of_fun_driver = { |
364 | .driver = { | 363 | .driver = { |
365 | .name = "fsl,upm-nand", | 364 | .name = "fsl,upm-nand", |
366 | .owner = THIS_MODULE, | 365 | .owner = THIS_MODULE, |
@@ -372,13 +371,13 @@ static struct of_platform_driver of_fun_driver = { | |||
372 | 371 | ||
373 | static int __init fun_module_init(void) | 372 | static int __init fun_module_init(void) |
374 | { | 373 | { |
375 | return of_register_platform_driver(&of_fun_driver); | 374 | return platform_driver_register(&of_fun_driver); |
376 | } | 375 | } |
377 | module_init(fun_module_init); | 376 | module_init(fun_module_init); |
378 | 377 | ||
379 | static void __exit fun_module_exit(void) | 378 | static void __exit fun_module_exit(void) |
380 | { | 379 | { |
381 | of_unregister_platform_driver(&of_fun_driver); | 380 | platform_driver_unregister(&of_fun_driver); |
382 | } | 381 | } |
383 | module_exit(fun_module_exit); | 382 | module_exit(fun_module_exit); |
384 | 383 | ||
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c index 469e649c911c..c2f95437e5e9 100644 --- a/drivers/mtd/nand/mpc5121_nfc.c +++ b/drivers/mtd/nand/mpc5121_nfc.c | |||
@@ -650,8 +650,7 @@ static void mpc5121_nfc_free(struct device *dev, struct mtd_info *mtd) | |||
650 | iounmap(prv->csreg); | 650 | iounmap(prv->csreg); |
651 | } | 651 | } |
652 | 652 | ||
653 | static int __devinit mpc5121_nfc_probe(struct platform_device *op, | 653 | static int __devinit mpc5121_nfc_probe(struct platform_device *op) |
654 | const struct of_device_id *match) | ||
655 | { | 654 | { |
656 | struct device_node *rootnode, *dn = op->dev.of_node; | 655 | struct device_node *rootnode, *dn = op->dev.of_node; |
657 | struct device *dev = &op->dev; | 656 | struct device *dev = &op->dev; |
@@ -891,7 +890,7 @@ static struct of_device_id mpc5121_nfc_match[] __devinitdata = { | |||
891 | {}, | 890 | {}, |
892 | }; | 891 | }; |
893 | 892 | ||
894 | static struct of_platform_driver mpc5121_nfc_driver = { | 893 | static struct platform_driver mpc5121_nfc_driver = { |
895 | .probe = mpc5121_nfc_probe, | 894 | .probe = mpc5121_nfc_probe, |
896 | .remove = __devexit_p(mpc5121_nfc_remove), | 895 | .remove = __devexit_p(mpc5121_nfc_remove), |
897 | .driver = { | 896 | .driver = { |
@@ -903,14 +902,14 @@ static struct of_platform_driver mpc5121_nfc_driver = { | |||
903 | 902 | ||
904 | static int __init mpc5121_nfc_init(void) | 903 | static int __init mpc5121_nfc_init(void) |
905 | { | 904 | { |
906 | return of_register_platform_driver(&mpc5121_nfc_driver); | 905 | return platform_driver_register(&mpc5121_nfc_driver); |
907 | } | 906 | } |
908 | 907 | ||
909 | module_init(mpc5121_nfc_init); | 908 | module_init(mpc5121_nfc_init); |
910 | 909 | ||
911 | static void __exit mpc5121_nfc_cleanup(void) | 910 | static void __exit mpc5121_nfc_cleanup(void) |
912 | { | 911 | { |
913 | of_unregister_platform_driver(&mpc5121_nfc_driver); | 912 | platform_driver_unregister(&mpc5121_nfc_driver); |
914 | } | 913 | } |
915 | 914 | ||
916 | module_exit(mpc5121_nfc_cleanup); | 915 | module_exit(mpc5121_nfc_cleanup); |
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index c9ae0a5023b6..bbe6d451290d 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c | |||
@@ -225,8 +225,7 @@ err: | |||
225 | return ret; | 225 | return ret; |
226 | } | 226 | } |
227 | 227 | ||
228 | static int __devinit ndfc_probe(struct platform_device *ofdev, | 228 | static int __devinit ndfc_probe(struct platform_device *ofdev) |
229 | const struct of_device_id *match) | ||
230 | { | 229 | { |
231 | struct ndfc_controller *ndfc = &ndfc_ctrl; | 230 | struct ndfc_controller *ndfc = &ndfc_ctrl; |
232 | const __be32 *reg; | 231 | const __be32 *reg; |
@@ -292,7 +291,7 @@ static const struct of_device_id ndfc_match[] = { | |||
292 | }; | 291 | }; |
293 | MODULE_DEVICE_TABLE(of, ndfc_match); | 292 | MODULE_DEVICE_TABLE(of, ndfc_match); |
294 | 293 | ||
295 | static struct of_platform_driver ndfc_driver = { | 294 | static struct platform_driver ndfc_driver = { |
296 | .driver = { | 295 | .driver = { |
297 | .name = "ndfc", | 296 | .name = "ndfc", |
298 | .owner = THIS_MODULE, | 297 | .owner = THIS_MODULE, |
@@ -304,12 +303,12 @@ static struct of_platform_driver ndfc_driver = { | |||
304 | 303 | ||
305 | static int __init ndfc_nand_init(void) | 304 | static int __init ndfc_nand_init(void) |
306 | { | 305 | { |
307 | return of_register_platform_driver(&ndfc_driver); | 306 | return platform_driver_register(&ndfc_driver); |
308 | } | 307 | } |
309 | 308 | ||
310 | static void __exit ndfc_nand_exit(void) | 309 | static void __exit ndfc_nand_exit(void) |
311 | { | 310 | { |
312 | of_unregister_platform_driver(&ndfc_driver); | 311 | platform_driver_unregister(&ndfc_driver); |
313 | } | 312 | } |
314 | 313 | ||
315 | module_init(ndfc_nand_init); | 314 | module_init(ndfc_nand_init); |
diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c index bb277a54986f..59efa829ef24 100644 --- a/drivers/mtd/nand/pasemi_nand.c +++ b/drivers/mtd/nand/pasemi_nand.c | |||
@@ -89,8 +89,7 @@ int pasemi_device_ready(struct mtd_info *mtd) | |||
89 | return !!(inl(lpcctl) & LBICTRL_LPCCTL_NR); | 89 | return !!(inl(lpcctl) & LBICTRL_LPCCTL_NR); |
90 | } | 90 | } |
91 | 91 | ||
92 | static int __devinit pasemi_nand_probe(struct platform_device *ofdev, | 92 | static int __devinit pasemi_nand_probe(struct platform_device *ofdev) |
93 | const struct of_device_id *match) | ||
94 | { | 93 | { |
95 | struct pci_dev *pdev; | 94 | struct pci_dev *pdev; |
96 | struct device_node *np = ofdev->dev.of_node; | 95 | struct device_node *np = ofdev->dev.of_node; |
@@ -219,7 +218,7 @@ static const struct of_device_id pasemi_nand_match[] = | |||
219 | 218 | ||
220 | MODULE_DEVICE_TABLE(of, pasemi_nand_match); | 219 | MODULE_DEVICE_TABLE(of, pasemi_nand_match); |
221 | 220 | ||
222 | static struct of_platform_driver pasemi_nand_driver = | 221 | static struct platform_driver pasemi_nand_driver = |
223 | { | 222 | { |
224 | .driver = { | 223 | .driver = { |
225 | .name = (char*)driver_name, | 224 | .name = (char*)driver_name, |
@@ -232,13 +231,13 @@ static struct of_platform_driver pasemi_nand_driver = | |||
232 | 231 | ||
233 | static int __init pasemi_nand_init(void) | 232 | static int __init pasemi_nand_init(void) |
234 | { | 233 | { |
235 | return of_register_platform_driver(&pasemi_nand_driver); | 234 | return platform_driver_register(&pasemi_nand_driver); |
236 | } | 235 | } |
237 | module_init(pasemi_nand_init); | 236 | module_init(pasemi_nand_init); |
238 | 237 | ||
239 | static void __exit pasemi_nand_exit(void) | 238 | static void __exit pasemi_nand_exit(void) |
240 | { | 239 | { |
241 | of_unregister_platform_driver(&pasemi_nand_driver); | 240 | platform_driver_unregister(&pasemi_nand_driver); |
242 | } | 241 | } |
243 | module_exit(pasemi_nand_exit); | 242 | module_exit(pasemi_nand_exit); |
244 | 243 | ||
diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/socrates_nand.c index a8e403eebedb..a853548986f0 100644 --- a/drivers/mtd/nand/socrates_nand.c +++ b/drivers/mtd/nand/socrates_nand.c | |||
@@ -162,8 +162,7 @@ static const char *part_probes[] = { "cmdlinepart", NULL }; | |||
162 | /* | 162 | /* |
163 | * Probe for the NAND device. | 163 | * Probe for the NAND device. |
164 | */ | 164 | */ |
165 | static int __devinit socrates_nand_probe(struct platform_device *ofdev, | 165 | static int __devinit socrates_nand_probe(struct platform_device *ofdev) |
166 | const struct of_device_id *ofid) | ||
167 | { | 166 | { |
168 | struct socrates_nand_host *host; | 167 | struct socrates_nand_host *host; |
169 | struct mtd_info *mtd; | 168 | struct mtd_info *mtd; |
@@ -300,7 +299,7 @@ static const struct of_device_id socrates_nand_match[] = | |||
300 | 299 | ||
301 | MODULE_DEVICE_TABLE(of, socrates_nand_match); | 300 | MODULE_DEVICE_TABLE(of, socrates_nand_match); |
302 | 301 | ||
303 | static struct of_platform_driver socrates_nand_driver = { | 302 | static struct platform_driver socrates_nand_driver = { |
304 | .driver = { | 303 | .driver = { |
305 | .name = "socrates_nand", | 304 | .name = "socrates_nand", |
306 | .owner = THIS_MODULE, | 305 | .owner = THIS_MODULE, |
@@ -312,12 +311,12 @@ static struct of_platform_driver socrates_nand_driver = { | |||
312 | 311 | ||
313 | static int __init socrates_nand_init(void) | 312 | static int __init socrates_nand_init(void) |
314 | { | 313 | { |
315 | return of_register_platform_driver(&socrates_nand_driver); | 314 | return platform_driver_register(&socrates_nand_driver); |
316 | } | 315 | } |
317 | 316 | ||
318 | static void __exit socrates_nand_exit(void) | 317 | static void __exit socrates_nand_exit(void) |
319 | { | 318 | { |
320 | of_unregister_platform_driver(&socrates_nand_driver); | 319 | platform_driver_unregister(&socrates_nand_driver); |
321 | } | 320 | } |
322 | 321 | ||
323 | module_init(socrates_nand_init); | 322 | module_init(socrates_nand_init); |
diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c index 546d3024b6f0..6defd4a8168e 100644 --- a/drivers/pcmcia/electra_cf.c +++ b/drivers/pcmcia/electra_cf.c | |||
@@ -181,8 +181,7 @@ static struct pccard_operations electra_cf_ops = { | |||
181 | .set_mem_map = electra_cf_set_mem_map, | 181 | .set_mem_map = electra_cf_set_mem_map, |
182 | }; | 182 | }; |
183 | 183 | ||
184 | static int __devinit electra_cf_probe(struct platform_device *ofdev, | 184 | static int __devinit electra_cf_probe(struct platform_device *ofdev) |
185 | const struct of_device_id *match) | ||
186 | { | 185 | { |
187 | struct device *device = &ofdev->dev; | 186 | struct device *device = &ofdev->dev; |
188 | struct device_node *np = ofdev->dev.of_node; | 187 | struct device_node *np = ofdev->dev.of_node; |
@@ -356,7 +355,7 @@ static const struct of_device_id electra_cf_match[] = { | |||
356 | }; | 355 | }; |
357 | MODULE_DEVICE_TABLE(of, electra_cf_match); | 356 | MODULE_DEVICE_TABLE(of, electra_cf_match); |
358 | 357 | ||
359 | static struct of_platform_driver electra_cf_driver = { | 358 | static struct platform_driver electra_cf_driver = { |
360 | .driver = { | 359 | .driver = { |
361 | .name = (char *)driver_name, | 360 | .name = (char *)driver_name, |
362 | .owner = THIS_MODULE, | 361 | .owner = THIS_MODULE, |
@@ -368,13 +367,13 @@ static struct of_platform_driver electra_cf_driver = { | |||
368 | 367 | ||
369 | static int __init electra_cf_init(void) | 368 | static int __init electra_cf_init(void) |
370 | { | 369 | { |
371 | return of_register_platform_driver(&electra_cf_driver); | 370 | return platform_driver_register(&electra_cf_driver); |
372 | } | 371 | } |
373 | module_init(electra_cf_init); | 372 | module_init(electra_cf_init); |
374 | 373 | ||
375 | static void __exit electra_cf_exit(void) | 374 | static void __exit electra_cf_exit(void) |
376 | { | 375 | { |
377 | of_unregister_platform_driver(&electra_cf_driver); | 376 | platform_driver_unregister(&electra_cf_driver); |
378 | } | 377 | } |
379 | module_exit(electra_cf_exit); | 378 | module_exit(electra_cf_exit); |
380 | 379 | ||
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c index 0db482771fb5..271a590a5f3c 100644 --- a/drivers/pcmcia/m8xx_pcmcia.c +++ b/drivers/pcmcia/m8xx_pcmcia.c | |||
@@ -1148,8 +1148,7 @@ static struct pccard_operations m8xx_services = { | |||
1148 | .set_mem_map = m8xx_set_mem_map, | 1148 | .set_mem_map = m8xx_set_mem_map, |
1149 | }; | 1149 | }; |
1150 | 1150 | ||
1151 | static int __init m8xx_probe(struct platform_device *ofdev, | 1151 | static int __init m8xx_probe(struct platform_device *ofdev) |
1152 | const struct of_device_id *match) | ||
1153 | { | 1152 | { |
1154 | struct pcmcia_win *w; | 1153 | struct pcmcia_win *w; |
1155 | unsigned int i, m, hwirq; | 1154 | unsigned int i, m, hwirq; |
@@ -1295,7 +1294,7 @@ static const struct of_device_id m8xx_pcmcia_match[] = { | |||
1295 | 1294 | ||
1296 | MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match); | 1295 | MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match); |
1297 | 1296 | ||
1298 | static struct of_platform_driver m8xx_pcmcia_driver = { | 1297 | static struct platform_driver m8xx_pcmcia_driver = { |
1299 | .driver = { | 1298 | .driver = { |
1300 | .name = driver_name, | 1299 | .name = driver_name, |
1301 | .owner = THIS_MODULE, | 1300 | .owner = THIS_MODULE, |
@@ -1307,12 +1306,12 @@ static struct of_platform_driver m8xx_pcmcia_driver = { | |||
1307 | 1306 | ||
1308 | static int __init m8xx_init(void) | 1307 | static int __init m8xx_init(void) |
1309 | { | 1308 | { |
1310 | return of_register_platform_driver(&m8xx_pcmcia_driver); | 1309 | return platform_driver_register(&m8xx_pcmcia_driver); |
1311 | } | 1310 | } |
1312 | 1311 | ||
1313 | static void __exit m8xx_exit(void) | 1312 | static void __exit m8xx_exit(void) |
1314 | { | 1313 | { |
1315 | of_unregister_platform_driver(&m8xx_pcmcia_driver); | 1314 | platform_driver_unregister(&m8xx_pcmcia_driver); |
1316 | } | 1315 | } |
1317 | 1316 | ||
1318 | module_init(m8xx_init); | 1317 | module_init(m8xx_init); |
diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c index dfcdf0901d21..2b952c654b14 100644 --- a/drivers/rtc/rtc-mpc5121.c +++ b/drivers/rtc/rtc-mpc5121.c | |||
@@ -268,8 +268,7 @@ static const struct rtc_class_ops mpc5121_rtc_ops = { | |||
268 | .update_irq_enable = mpc5121_rtc_update_irq_enable, | 268 | .update_irq_enable = mpc5121_rtc_update_irq_enable, |
269 | }; | 269 | }; |
270 | 270 | ||
271 | static int __devinit mpc5121_rtc_probe(struct platform_device *op, | 271 | static int __devinit mpc5121_rtc_probe(struct platform_device *op) |
272 | const struct of_device_id *match) | ||
273 | { | 272 | { |
274 | struct mpc5121_rtc_data *rtc; | 273 | struct mpc5121_rtc_data *rtc; |
275 | int err = 0; | 274 | int err = 0; |
@@ -364,7 +363,7 @@ static struct of_device_id mpc5121_rtc_match[] __devinitdata = { | |||
364 | {}, | 363 | {}, |
365 | }; | 364 | }; |
366 | 365 | ||
367 | static struct of_platform_driver mpc5121_rtc_driver = { | 366 | static struct platform_driver mpc5121_rtc_driver = { |
368 | .driver = { | 367 | .driver = { |
369 | .name = "mpc5121-rtc", | 368 | .name = "mpc5121-rtc", |
370 | .owner = THIS_MODULE, | 369 | .owner = THIS_MODULE, |
@@ -376,13 +375,13 @@ static struct of_platform_driver mpc5121_rtc_driver = { | |||
376 | 375 | ||
377 | static int __init mpc5121_rtc_init(void) | 376 | static int __init mpc5121_rtc_init(void) |
378 | { | 377 | { |
379 | return of_register_platform_driver(&mpc5121_rtc_driver); | 378 | return platform_driver_register(&mpc5121_rtc_driver); |
380 | } | 379 | } |
381 | module_init(mpc5121_rtc_init); | 380 | module_init(mpc5121_rtc_init); |
382 | 381 | ||
383 | static void __exit mpc5121_rtc_exit(void) | 382 | static void __exit mpc5121_rtc_exit(void) |
384 | { | 383 | { |
385 | of_unregister_platform_driver(&mpc5121_rtc_driver); | 384 | platform_driver_unregister(&mpc5121_rtc_driver); |
386 | } | 385 | } |
387 | module_exit(mpc5121_rtc_exit); | 386 | module_exit(mpc5121_rtc_exit); |
388 | 387 | ||
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index eca855a55c0d..45db1d570df1 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c | |||
@@ -528,8 +528,7 @@ static const struct file_operations cpwd_fops = { | |||
528 | .llseek = no_llseek, | 528 | .llseek = no_llseek, |
529 | }; | 529 | }; |
530 | 530 | ||
531 | static int __devinit cpwd_probe(struct platform_device *op, | 531 | static int __devinit cpwd_probe(struct platform_device *op) |
532 | const struct of_device_id *match) | ||
533 | { | 532 | { |
534 | struct device_node *options; | 533 | struct device_node *options; |
535 | const char *str_prop; | 534 | const char *str_prop; |
@@ -678,7 +677,7 @@ static const struct of_device_id cpwd_match[] = { | |||
678 | }; | 677 | }; |
679 | MODULE_DEVICE_TABLE(of, cpwd_match); | 678 | MODULE_DEVICE_TABLE(of, cpwd_match); |
680 | 679 | ||
681 | static struct of_platform_driver cpwd_driver = { | 680 | static struct platform_driver cpwd_driver = { |
682 | .driver = { | 681 | .driver = { |
683 | .name = DRIVER_NAME, | 682 | .name = DRIVER_NAME, |
684 | .owner = THIS_MODULE, | 683 | .owner = THIS_MODULE, |
@@ -690,12 +689,12 @@ static struct of_platform_driver cpwd_driver = { | |||
690 | 689 | ||
691 | static int __init cpwd_init(void) | 690 | static int __init cpwd_init(void) |
692 | { | 691 | { |
693 | return of_register_platform_driver(&cpwd_driver); | 692 | return platform_driver_register(&cpwd_driver); |
694 | } | 693 | } |
695 | 694 | ||
696 | static void __exit cpwd_exit(void) | 695 | static void __exit cpwd_exit(void) |
697 | { | 696 | { |
698 | of_unregister_platform_driver(&cpwd_driver); | 697 | platform_driver_unregister(&cpwd_driver); |
699 | } | 698 | } |
700 | 699 | ||
701 | module_init(cpwd_init); | 700 | module_init(cpwd_init); |
diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c index f6bd6f10fcec..29a7cd4b90c8 100644 --- a/drivers/watchdog/gef_wdt.c +++ b/drivers/watchdog/gef_wdt.c | |||
@@ -261,8 +261,7 @@ static struct miscdevice gef_wdt_miscdev = { | |||
261 | }; | 261 | }; |
262 | 262 | ||
263 | 263 | ||
264 | static int __devinit gef_wdt_probe(struct platform_device *dev, | 264 | static int __devinit gef_wdt_probe(struct platform_device *dev) |
265 | const struct of_device_id *match) | ||
266 | { | 265 | { |
267 | int timeout = 10; | 266 | int timeout = 10; |
268 | u32 freq; | 267 | u32 freq; |
@@ -303,7 +302,7 @@ static const struct of_device_id gef_wdt_ids[] = { | |||
303 | {}, | 302 | {}, |
304 | }; | 303 | }; |
305 | 304 | ||
306 | static struct of_platform_driver gef_wdt_driver = { | 305 | static struct platform_driver gef_wdt_driver = { |
307 | .driver = { | 306 | .driver = { |
308 | .name = "gef_wdt", | 307 | .name = "gef_wdt", |
309 | .owner = THIS_MODULE, | 308 | .owner = THIS_MODULE, |
@@ -315,12 +314,12 @@ static struct of_platform_driver gef_wdt_driver = { | |||
315 | static int __init gef_wdt_init(void) | 314 | static int __init gef_wdt_init(void) |
316 | { | 315 | { |
317 | printk(KERN_INFO "GE watchdog driver\n"); | 316 | printk(KERN_INFO "GE watchdog driver\n"); |
318 | return of_register_platform_driver(&gef_wdt_driver); | 317 | return platform_driver_register(&gef_wdt_driver); |
319 | } | 318 | } |
320 | 319 | ||
321 | static void __exit gef_wdt_exit(void) | 320 | static void __exit gef_wdt_exit(void) |
322 | { | 321 | { |
323 | of_unregister_platform_driver(&gef_wdt_driver); | 322 | platform_driver_unregister(&gef_wdt_driver); |
324 | } | 323 | } |
325 | 324 | ||
326 | module_init(gef_wdt_init); | 325 | module_init(gef_wdt_init); |
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c index 8fa213cdb499..ea438ad53055 100644 --- a/drivers/watchdog/mpc8xxx_wdt.c +++ b/drivers/watchdog/mpc8xxx_wdt.c | |||
@@ -185,15 +185,18 @@ static struct miscdevice mpc8xxx_wdt_miscdev = { | |||
185 | .fops = &mpc8xxx_wdt_fops, | 185 | .fops = &mpc8xxx_wdt_fops, |
186 | }; | 186 | }; |
187 | 187 | ||
188 | static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev, | 188 | static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev) |
189 | const struct of_device_id *match) | ||
190 | { | 189 | { |
191 | int ret; | 190 | int ret; |
192 | struct device_node *np = ofdev->dev.of_node; | 191 | struct device_node *np = ofdev->dev.of_node; |
193 | struct mpc8xxx_wdt_type *wdt_type = match->data; | 192 | struct mpc8xxx_wdt_type *wdt_type; |
194 | u32 freq = fsl_get_sys_freq(); | 193 | u32 freq = fsl_get_sys_freq(); |
195 | bool enabled; | 194 | bool enabled; |
196 | 195 | ||
196 | if (!ofdev->dev.of_match) | ||
197 | return -EINVAL; | ||
198 | wdt_type = match->data; | ||
199 | |||
197 | if (!freq || freq == -1) | 200 | if (!freq || freq == -1) |
198 | return -EINVAL; | 201 | return -EINVAL; |
199 | 202 | ||
@@ -272,7 +275,7 @@ static const struct of_device_id mpc8xxx_wdt_match[] = { | |||
272 | }; | 275 | }; |
273 | MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match); | 276 | MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match); |
274 | 277 | ||
275 | static struct of_platform_driver mpc8xxx_wdt_driver = { | 278 | static struct platform_driver mpc8xxx_wdt_driver = { |
276 | .probe = mpc8xxx_wdt_probe, | 279 | .probe = mpc8xxx_wdt_probe, |
277 | .remove = __devexit_p(mpc8xxx_wdt_remove), | 280 | .remove = __devexit_p(mpc8xxx_wdt_remove), |
278 | .driver = { | 281 | .driver = { |
@@ -308,13 +311,13 @@ module_init(mpc8xxx_wdt_init_late); | |||
308 | 311 | ||
309 | static int __init mpc8xxx_wdt_init(void) | 312 | static int __init mpc8xxx_wdt_init(void) |
310 | { | 313 | { |
311 | return of_register_platform_driver(&mpc8xxx_wdt_driver); | 314 | return platform_driver_register(&mpc8xxx_wdt_driver); |
312 | } | 315 | } |
313 | arch_initcall(mpc8xxx_wdt_init); | 316 | arch_initcall(mpc8xxx_wdt_init); |
314 | 317 | ||
315 | static void __exit mpc8xxx_wdt_exit(void) | 318 | static void __exit mpc8xxx_wdt_exit(void) |
316 | { | 319 | { |
317 | of_unregister_platform_driver(&mpc8xxx_wdt_driver); | 320 | platform_driver_unregister(&mpc8xxx_wdt_driver); |
318 | } | 321 | } |
319 | module_exit(mpc8xxx_wdt_exit); | 322 | module_exit(mpc8xxx_wdt_exit); |
320 | 323 | ||
diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c index 3faee1ae64bd..109b533896b7 100644 --- a/drivers/watchdog/riowd.c +++ b/drivers/watchdog/riowd.c | |||
@@ -172,8 +172,7 @@ static struct miscdevice riowd_miscdev = { | |||
172 | .fops = &riowd_fops | 172 | .fops = &riowd_fops |
173 | }; | 173 | }; |
174 | 174 | ||
175 | static int __devinit riowd_probe(struct platform_device *op, | 175 | static int __devinit riowd_probe(struct platform_device *op) |
176 | const struct of_device_id *match) | ||
177 | { | 176 | { |
178 | struct riowd *p; | 177 | struct riowd *p; |
179 | int err = -EINVAL; | 178 | int err = -EINVAL; |
@@ -238,7 +237,7 @@ static const struct of_device_id riowd_match[] = { | |||
238 | }; | 237 | }; |
239 | MODULE_DEVICE_TABLE(of, riowd_match); | 238 | MODULE_DEVICE_TABLE(of, riowd_match); |
240 | 239 | ||
241 | static struct of_platform_driver riowd_driver = { | 240 | static struct platform_driver riowd_driver = { |
242 | .driver = { | 241 | .driver = { |
243 | .name = DRIVER_NAME, | 242 | .name = DRIVER_NAME, |
244 | .owner = THIS_MODULE, | 243 | .owner = THIS_MODULE, |
@@ -250,12 +249,12 @@ static struct of_platform_driver riowd_driver = { | |||
250 | 249 | ||
251 | static int __init riowd_init(void) | 250 | static int __init riowd_init(void) |
252 | { | 251 | { |
253 | return of_register_platform_driver(&riowd_driver); | 252 | return platform_driver_register(&riowd_driver); |
254 | } | 253 | } |
255 | 254 | ||
256 | static void __exit riowd_exit(void) | 255 | static void __exit riowd_exit(void) |
257 | { | 256 | { |
258 | of_unregister_platform_driver(&riowd_driver); | 257 | platform_driver_unregister(&riowd_driver); |
259 | } | 258 | } |
260 | 259 | ||
261 | module_init(riowd_init); | 260 | module_init(riowd_init); |