diff options
27 files changed, 133 insertions, 148 deletions
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h index aa4c82648d88..cb33608cc68f 100644 --- a/arch/sparc/include/asm/parport.h +++ b/arch/sparc/include/asm/parport.h | |||
@@ -103,7 +103,7 @@ static inline unsigned int get_dma_residue(unsigned int dmanr) | |||
103 | return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info); | 103 | return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info); |
104 | } | 104 | } |
105 | 105 | ||
106 | static int __devinit ecpp_probe(struct platform_device *op, const struct of_device_id *match) | 106 | static int __devinit ecpp_probe(struct platform_device *op) |
107 | { | 107 | { |
108 | unsigned long base = op->resource[0].start; | 108 | unsigned long base = op->resource[0].start; |
109 | unsigned long config = op->resource[1].start; | 109 | unsigned long config = op->resource[1].start; |
@@ -235,7 +235,7 @@ static const struct of_device_id ecpp_match[] = { | |||
235 | {}, | 235 | {}, |
236 | }; | 236 | }; |
237 | 237 | ||
238 | static struct of_platform_driver ecpp_driver = { | 238 | static struct platform_driver ecpp_driver = { |
239 | .driver = { | 239 | .driver = { |
240 | .name = "ecpp", | 240 | .name = "ecpp", |
241 | .owner = THIS_MODULE, | 241 | .owner = THIS_MODULE, |
@@ -247,7 +247,7 @@ static struct of_platform_driver ecpp_driver = { | |||
247 | 247 | ||
248 | static int parport_pc_find_nonpci_ports(int autoirq, int autodma) | 248 | static int parport_pc_find_nonpci_ports(int autoirq, int autodma) |
249 | { | 249 | { |
250 | return of_register_platform_driver(&ecpp_driver); | 250 | return platform_driver_register(&ecpp_driver); |
251 | } | 251 | } |
252 | 252 | ||
253 | #endif /* !(_ASM_SPARC64_PARPORT_H */ | 253 | #endif /* !(_ASM_SPARC64_PARPORT_H */ |
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c index 52de4a9424e8..f679c57644d5 100644 --- a/arch/sparc/kernel/apc.c +++ b/arch/sparc/kernel/apc.c | |||
@@ -137,8 +137,7 @@ static const struct file_operations apc_fops = { | |||
137 | 137 | ||
138 | static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; | 138 | static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; |
139 | 139 | ||
140 | static int __devinit apc_probe(struct platform_device *op, | 140 | static int __devinit apc_probe(struct platform_device *op) |
141 | const struct of_device_id *match) | ||
142 | { | 141 | { |
143 | int err; | 142 | int err; |
144 | 143 | ||
@@ -174,7 +173,7 @@ static struct of_device_id __initdata apc_match[] = { | |||
174 | }; | 173 | }; |
175 | MODULE_DEVICE_TABLE(of, apc_match); | 174 | MODULE_DEVICE_TABLE(of, apc_match); |
176 | 175 | ||
177 | static struct of_platform_driver apc_driver = { | 176 | static struct platform_driver apc_driver = { |
178 | .driver = { | 177 | .driver = { |
179 | .name = "apc", | 178 | .name = "apc", |
180 | .owner = THIS_MODULE, | 179 | .owner = THIS_MODULE, |
@@ -185,7 +184,7 @@ static struct of_platform_driver apc_driver = { | |||
185 | 184 | ||
186 | static int __init apc_init(void) | 185 | static int __init apc_init(void) |
187 | { | 186 | { |
188 | return of_register_platform_driver(&apc_driver); | 187 | return platform_driver_register(&apc_driver); |
189 | } | 188 | } |
190 | 189 | ||
191 | /* This driver is not critical to the boot process | 190 | /* This driver is not critical to the boot process |
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c index 3efd3c5af6a9..2abace076c7d 100644 --- a/arch/sparc/kernel/auxio_64.c +++ b/arch/sparc/kernel/auxio_64.c | |||
@@ -102,8 +102,7 @@ static struct of_device_id __initdata auxio_match[] = { | |||
102 | 102 | ||
103 | MODULE_DEVICE_TABLE(of, auxio_match); | 103 | MODULE_DEVICE_TABLE(of, auxio_match); |
104 | 104 | ||
105 | static int __devinit auxio_probe(struct platform_device *dev, | 105 | static int __devinit auxio_probe(struct platform_device *dev) |
106 | const struct of_device_id *match) | ||
107 | { | 106 | { |
108 | struct device_node *dp = dev->dev.of_node; | 107 | struct device_node *dp = dev->dev.of_node; |
109 | unsigned long size; | 108 | unsigned long size; |
@@ -132,7 +131,7 @@ static int __devinit auxio_probe(struct platform_device *dev, | |||
132 | return 0; | 131 | return 0; |
133 | } | 132 | } |
134 | 133 | ||
135 | static struct of_platform_driver auxio_driver = { | 134 | static struct platform_driver auxio_driver = { |
136 | .probe = auxio_probe, | 135 | .probe = auxio_probe, |
137 | .driver = { | 136 | .driver = { |
138 | .name = "auxio", | 137 | .name = "auxio", |
@@ -143,7 +142,7 @@ static struct of_platform_driver auxio_driver = { | |||
143 | 142 | ||
144 | static int __init auxio_init(void) | 143 | static int __init auxio_init(void) |
145 | { | 144 | { |
146 | return of_register_platform_driver(&auxio_driver); | 145 | return platform_driver_register(&auxio_driver); |
147 | } | 146 | } |
148 | 147 | ||
149 | /* Must be after subsys_initcall() so that busses are probed. Must | 148 | /* Must be after subsys_initcall() so that busses are probed. Must |
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c index cfa2624c5332..136d3718a74a 100644 --- a/arch/sparc/kernel/central.c +++ b/arch/sparc/kernel/central.c | |||
@@ -59,8 +59,7 @@ static int __devinit clock_board_calc_nslots(struct clock_board *p) | |||
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
62 | static int __devinit clock_board_probe(struct platform_device *op, | 62 | static int __devinit clock_board_probe(struct platform_device *op) |
63 | const struct of_device_id *match) | ||
64 | { | 63 | { |
65 | struct clock_board *p = kzalloc(sizeof(*p), GFP_KERNEL); | 64 | struct clock_board *p = kzalloc(sizeof(*p), GFP_KERNEL); |
66 | int err = -ENOMEM; | 65 | int err = -ENOMEM; |
@@ -148,7 +147,7 @@ static struct of_device_id __initdata clock_board_match[] = { | |||
148 | {}, | 147 | {}, |
149 | }; | 148 | }; |
150 | 149 | ||
151 | static struct of_platform_driver clock_board_driver = { | 150 | static struct platform_driver clock_board_driver = { |
152 | .probe = clock_board_probe, | 151 | .probe = clock_board_probe, |
153 | .driver = { | 152 | .driver = { |
154 | .name = "clock_board", | 153 | .name = "clock_board", |
@@ -157,8 +156,7 @@ static struct of_platform_driver clock_board_driver = { | |||
157 | }, | 156 | }, |
158 | }; | 157 | }; |
159 | 158 | ||
160 | static int __devinit fhc_probe(struct platform_device *op, | 159 | static int __devinit fhc_probe(struct platform_device *op) |
161 | const struct of_device_id *match) | ||
162 | { | 160 | { |
163 | struct fhc *p = kzalloc(sizeof(*p), GFP_KERNEL); | 161 | struct fhc *p = kzalloc(sizeof(*p), GFP_KERNEL); |
164 | int err = -ENOMEM; | 162 | int err = -ENOMEM; |
@@ -254,7 +252,7 @@ static struct of_device_id __initdata fhc_match[] = { | |||
254 | {}, | 252 | {}, |
255 | }; | 253 | }; |
256 | 254 | ||
257 | static struct of_platform_driver fhc_driver = { | 255 | static struct platform_driver fhc_driver = { |
258 | .probe = fhc_probe, | 256 | .probe = fhc_probe, |
259 | .driver = { | 257 | .driver = { |
260 | .name = "fhc", | 258 | .name = "fhc", |
@@ -265,8 +263,8 @@ static struct of_platform_driver fhc_driver = { | |||
265 | 263 | ||
266 | static int __init sunfire_init(void) | 264 | static int __init sunfire_init(void) |
267 | { | 265 | { |
268 | (void) of_register_platform_driver(&fhc_driver); | 266 | (void) platform_driver_register(&fhc_driver); |
269 | (void) of_register_platform_driver(&clock_board_driver); | 267 | (void) platform_driver_register(&clock_board_driver); |
270 | return 0; | 268 | return 0; |
271 | } | 269 | } |
272 | 270 | ||
diff --git a/arch/sparc/kernel/chmc.c b/arch/sparc/kernel/chmc.c index 08c466ebb32b..668c7be5d365 100644 --- a/arch/sparc/kernel/chmc.c +++ b/arch/sparc/kernel/chmc.c | |||
@@ -392,8 +392,7 @@ static void __devinit jbusmc_construct_dimm_groups(struct jbusmc *p, | |||
392 | } | 392 | } |
393 | } | 393 | } |
394 | 394 | ||
395 | static int __devinit jbusmc_probe(struct platform_device *op, | 395 | static int __devinit jbusmc_probe(struct platform_device *op) |
396 | const struct of_device_id *match) | ||
397 | { | 396 | { |
398 | const struct linux_prom64_registers *mem_regs; | 397 | const struct linux_prom64_registers *mem_regs; |
399 | struct device_node *mem_node; | 398 | struct device_node *mem_node; |
@@ -690,8 +689,7 @@ static void chmc_fetch_decode_regs(struct chmc *p) | |||
690 | chmc_read_mcreg(p, CHMCTRL_DECODE4)); | 689 | chmc_read_mcreg(p, CHMCTRL_DECODE4)); |
691 | } | 690 | } |
692 | 691 | ||
693 | static int __devinit chmc_probe(struct platform_device *op, | 692 | static int __devinit chmc_probe(struct platform_device *op) |
694 | const struct of_device_id *match) | ||
695 | { | 693 | { |
696 | struct device_node *dp = op->dev.of_node; | 694 | struct device_node *dp = op->dev.of_node; |
697 | unsigned long ver; | 695 | unsigned long ver; |
@@ -765,13 +763,12 @@ out_free: | |||
765 | goto out; | 763 | goto out; |
766 | } | 764 | } |
767 | 765 | ||
768 | static int __devinit us3mc_probe(struct platform_device *op, | 766 | static int __devinit us3mc_probe(struct platform_device *op) |
769 | const struct of_device_id *match) | ||
770 | { | 767 | { |
771 | if (mc_type == MC_TYPE_SAFARI) | 768 | if (mc_type == MC_TYPE_SAFARI) |
772 | return chmc_probe(op, match); | 769 | return chmc_probe(op); |
773 | else if (mc_type == MC_TYPE_JBUS) | 770 | else if (mc_type == MC_TYPE_JBUS) |
774 | return jbusmc_probe(op, match); | 771 | return jbusmc_probe(op); |
775 | return -ENODEV; | 772 | return -ENODEV; |
776 | } | 773 | } |
777 | 774 | ||
@@ -810,7 +807,7 @@ static const struct of_device_id us3mc_match[] = { | |||
810 | }; | 807 | }; |
811 | MODULE_DEVICE_TABLE(of, us3mc_match); | 808 | MODULE_DEVICE_TABLE(of, us3mc_match); |
812 | 809 | ||
813 | static struct of_platform_driver us3mc_driver = { | 810 | static struct platform_driver us3mc_driver = { |
814 | .driver = { | 811 | .driver = { |
815 | .name = "us3mc", | 812 | .name = "us3mc", |
816 | .owner = THIS_MODULE, | 813 | .owner = THIS_MODULE, |
@@ -848,7 +845,7 @@ static int __init us3mc_init(void) | |||
848 | ret = register_dimm_printer(us3mc_dimm_printer); | 845 | ret = register_dimm_printer(us3mc_dimm_printer); |
849 | 846 | ||
850 | if (!ret) { | 847 | if (!ret) { |
851 | ret = of_register_platform_driver(&us3mc_driver); | 848 | ret = platform_driver_register(&us3mc_driver); |
852 | if (ret) | 849 | if (ret) |
853 | unregister_dimm_printer(us3mc_dimm_printer); | 850 | unregister_dimm_printer(us3mc_dimm_printer); |
854 | } | 851 | } |
@@ -859,7 +856,7 @@ static void __exit us3mc_cleanup(void) | |||
859 | { | 856 | { |
860 | if (us3mc_platform()) { | 857 | if (us3mc_platform()) { |
861 | unregister_dimm_printer(us3mc_dimm_printer); | 858 | unregister_dimm_printer(us3mc_dimm_printer); |
862 | of_unregister_platform_driver(&us3mc_driver); | 859 | platform_driver_unregister(&us3mc_driver); |
863 | } | 860 | } |
864 | } | 861 | } |
865 | 862 | ||
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c index efb896d68754..be5e2441c6d7 100644 --- a/arch/sparc/kernel/pci_fire.c +++ b/arch/sparc/kernel/pci_fire.c | |||
@@ -455,8 +455,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm, | |||
455 | return 0; | 455 | return 0; |
456 | } | 456 | } |
457 | 457 | ||
458 | static int __devinit fire_probe(struct platform_device *op, | 458 | static int __devinit fire_probe(struct platform_device *op) |
459 | const struct of_device_id *match) | ||
460 | { | 459 | { |
461 | struct device_node *dp = op->dev.of_node; | 460 | struct device_node *dp = op->dev.of_node; |
462 | struct pci_pbm_info *pbm; | 461 | struct pci_pbm_info *pbm; |
@@ -507,7 +506,7 @@ static struct of_device_id __initdata fire_match[] = { | |||
507 | {}, | 506 | {}, |
508 | }; | 507 | }; |
509 | 508 | ||
510 | static struct of_platform_driver fire_driver = { | 509 | static struct platform_driver fire_driver = { |
511 | .driver = { | 510 | .driver = { |
512 | .name = DRIVER_NAME, | 511 | .name = DRIVER_NAME, |
513 | .owner = THIS_MODULE, | 512 | .owner = THIS_MODULE, |
@@ -518,7 +517,7 @@ static struct of_platform_driver fire_driver = { | |||
518 | 517 | ||
519 | static int __init fire_init(void) | 518 | static int __init fire_init(void) |
520 | { | 519 | { |
521 | return of_register_platform_driver(&fire_driver); | 520 | return platform_driver_register(&fire_driver); |
522 | } | 521 | } |
523 | 522 | ||
524 | subsys_initcall(fire_init); | 523 | subsys_initcall(fire_init); |
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c index 22eab7cf3b11..56ee745064de 100644 --- a/arch/sparc/kernel/pci_psycho.c +++ b/arch/sparc/kernel/pci_psycho.c | |||
@@ -503,8 +503,7 @@ static struct pci_pbm_info * __devinit psycho_find_sibling(u32 upa_portid) | |||
503 | 503 | ||
504 | #define PSYCHO_CONFIGSPACE 0x001000000UL | 504 | #define PSYCHO_CONFIGSPACE 0x001000000UL |
505 | 505 | ||
506 | static int __devinit psycho_probe(struct platform_device *op, | 506 | static int __devinit psycho_probe(struct platform_device *op) |
507 | const struct of_device_id *match) | ||
508 | { | 507 | { |
509 | const struct linux_prom64_registers *pr_regs; | 508 | const struct linux_prom64_registers *pr_regs; |
510 | struct device_node *dp = op->dev.of_node; | 509 | struct device_node *dp = op->dev.of_node; |
@@ -601,7 +600,7 @@ static struct of_device_id __initdata psycho_match[] = { | |||
601 | {}, | 600 | {}, |
602 | }; | 601 | }; |
603 | 602 | ||
604 | static struct of_platform_driver psycho_driver = { | 603 | static struct platform_driver psycho_driver = { |
605 | .driver = { | 604 | .driver = { |
606 | .name = DRIVER_NAME, | 605 | .name = DRIVER_NAME, |
607 | .owner = THIS_MODULE, | 606 | .owner = THIS_MODULE, |
@@ -612,7 +611,7 @@ static struct of_platform_driver psycho_driver = { | |||
612 | 611 | ||
613 | static int __init psycho_init(void) | 612 | static int __init psycho_init(void) |
614 | { | 613 | { |
615 | return of_register_platform_driver(&psycho_driver); | 614 | return platform_driver_register(&psycho_driver); |
616 | } | 615 | } |
617 | 616 | ||
618 | subsys_initcall(psycho_init); | 617 | subsys_initcall(psycho_init); |
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c index 5c3f5ec4cabc..2857073342d2 100644 --- a/arch/sparc/kernel/pci_sabre.c +++ b/arch/sparc/kernel/pci_sabre.c | |||
@@ -452,8 +452,7 @@ static void __devinit sabre_pbm_init(struct pci_pbm_info *pbm, | |||
452 | sabre_scan_bus(pbm, &op->dev); | 452 | sabre_scan_bus(pbm, &op->dev); |
453 | } | 453 | } |
454 | 454 | ||
455 | static int __devinit sabre_probe(struct platform_device *op, | 455 | static int __devinit sabre_probe(struct platform_device *op) |
456 | const struct of_device_id *match) | ||
457 | { | 456 | { |
458 | const struct linux_prom64_registers *pr_regs; | 457 | const struct linux_prom64_registers *pr_regs; |
459 | struct device_node *dp = op->dev.of_node; | 458 | struct device_node *dp = op->dev.of_node; |
@@ -464,7 +463,7 @@ static int __devinit sabre_probe(struct platform_device *op, | |||
464 | const u32 *vdma; | 463 | const u32 *vdma; |
465 | u64 clear_irq; | 464 | u64 clear_irq; |
466 | 465 | ||
467 | hummingbird_p = (match->data != NULL); | 466 | hummingbird_p = op->dev.of_match && (op->dev.of_match->data != NULL); |
468 | if (!hummingbird_p) { | 467 | if (!hummingbird_p) { |
469 | struct device_node *cpu_dp; | 468 | struct device_node *cpu_dp; |
470 | 469 | ||
@@ -595,7 +594,7 @@ static struct of_device_id __initdata sabre_match[] = { | |||
595 | {}, | 594 | {}, |
596 | }; | 595 | }; |
597 | 596 | ||
598 | static struct of_platform_driver sabre_driver = { | 597 | static struct platform_driver sabre_driver = { |
599 | .driver = { | 598 | .driver = { |
600 | .name = DRIVER_NAME, | 599 | .name = DRIVER_NAME, |
601 | .owner = THIS_MODULE, | 600 | .owner = THIS_MODULE, |
@@ -606,7 +605,7 @@ static struct of_platform_driver sabre_driver = { | |||
606 | 605 | ||
607 | static int __init sabre_init(void) | 606 | static int __init sabre_init(void) |
608 | { | 607 | { |
609 | return of_register_platform_driver(&sabre_driver); | 608 | return platform_driver_register(&sabre_driver); |
610 | } | 609 | } |
611 | 610 | ||
612 | subsys_initcall(sabre_init); | 611 | subsys_initcall(sabre_init); |
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 445a47a2fb3d..6783410ceb02 100644 --- a/arch/sparc/kernel/pci_schizo.c +++ b/arch/sparc/kernel/pci_schizo.c | |||
@@ -1460,10 +1460,11 @@ out_err: | |||
1460 | return err; | 1460 | return err; |
1461 | } | 1461 | } |
1462 | 1462 | ||
1463 | static int __devinit schizo_probe(struct platform_device *op, | 1463 | static int __devinit schizo_probe(struct platform_device *op) |
1464 | const struct of_device_id *match) | ||
1465 | { | 1464 | { |
1466 | return __schizo_init(op, (unsigned long) match->data); | 1465 | if (!op->dev.of_match) |
1466 | return -EINVAL; | ||
1467 | return __schizo_init(op, (unsigned long) op->dev.of_match->data); | ||
1467 | } | 1468 | } |
1468 | 1469 | ||
1469 | /* The ordering of this table is very important. Some Tomatillo | 1470 | /* The ordering of this table is very important. Some Tomatillo |
@@ -1490,7 +1491,7 @@ static struct of_device_id __initdata schizo_match[] = { | |||
1490 | {}, | 1491 | {}, |
1491 | }; | 1492 | }; |
1492 | 1493 | ||
1493 | static struct of_platform_driver schizo_driver = { | 1494 | static struct platform_driver schizo_driver = { |
1494 | .driver = { | 1495 | .driver = { |
1495 | .name = DRIVER_NAME, | 1496 | .name = DRIVER_NAME, |
1496 | .owner = THIS_MODULE, | 1497 | .owner = THIS_MODULE, |
@@ -1501,7 +1502,7 @@ static struct of_platform_driver schizo_driver = { | |||
1501 | 1502 | ||
1502 | static int __init schizo_init(void) | 1503 | static int __init schizo_init(void) |
1503 | { | 1504 | { |
1504 | return of_register_platform_driver(&schizo_driver); | 1505 | return platform_driver_register(&schizo_driver); |
1505 | } | 1506 | } |
1506 | 1507 | ||
1507 | subsys_initcall(schizo_init); | 1508 | subsys_initcall(schizo_init); |
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 743344aa6d8a..158cd739b263 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
@@ -918,8 +918,7 @@ static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm, | |||
918 | return 0; | 918 | return 0; |
919 | } | 919 | } |
920 | 920 | ||
921 | static int __devinit pci_sun4v_probe(struct platform_device *op, | 921 | static int __devinit pci_sun4v_probe(struct platform_device *op) |
922 | const struct of_device_id *match) | ||
923 | { | 922 | { |
924 | const struct linux_prom64_registers *regs; | 923 | const struct linux_prom64_registers *regs; |
925 | static int hvapi_negotiated = 0; | 924 | static int hvapi_negotiated = 0; |
@@ -1008,7 +1007,7 @@ static struct of_device_id __initdata pci_sun4v_match[] = { | |||
1008 | {}, | 1007 | {}, |
1009 | }; | 1008 | }; |
1010 | 1009 | ||
1011 | static struct of_platform_driver pci_sun4v_driver = { | 1010 | static struct platform_driver pci_sun4v_driver = { |
1012 | .driver = { | 1011 | .driver = { |
1013 | .name = DRIVER_NAME, | 1012 | .name = DRIVER_NAME, |
1014 | .owner = THIS_MODULE, | 1013 | .owner = THIS_MODULE, |
@@ -1019,7 +1018,7 @@ static struct of_platform_driver pci_sun4v_driver = { | |||
1019 | 1018 | ||
1020 | static int __init pci_sun4v_init(void) | 1019 | static int __init pci_sun4v_init(void) |
1021 | { | 1020 | { |
1022 | return of_register_platform_driver(&pci_sun4v_driver); | 1021 | return platform_driver_register(&pci_sun4v_driver); |
1023 | } | 1022 | } |
1024 | 1023 | ||
1025 | subsys_initcall(pci_sun4v_init); | 1024 | subsys_initcall(pci_sun4v_init); |
diff --git a/arch/sparc/kernel/pmc.c b/arch/sparc/kernel/pmc.c index 94536a85f161..93d7b4465f8d 100644 --- a/arch/sparc/kernel/pmc.c +++ b/arch/sparc/kernel/pmc.c | |||
@@ -51,8 +51,7 @@ static void pmc_swift_idle(void) | |||
51 | #endif | 51 | #endif |
52 | } | 52 | } |
53 | 53 | ||
54 | static int __devinit pmc_probe(struct platform_device *op, | 54 | static int __devinit pmc_probe(struct platform_device *op) |
55 | const struct of_device_id *match) | ||
56 | { | 55 | { |
57 | regs = of_ioremap(&op->resource[0], 0, | 56 | regs = of_ioremap(&op->resource[0], 0, |
58 | resource_size(&op->resource[0]), PMC_OBPNAME); | 57 | resource_size(&op->resource[0]), PMC_OBPNAME); |
@@ -78,7 +77,7 @@ static struct of_device_id __initdata pmc_match[] = { | |||
78 | }; | 77 | }; |
79 | MODULE_DEVICE_TABLE(of, pmc_match); | 78 | MODULE_DEVICE_TABLE(of, pmc_match); |
80 | 79 | ||
81 | static struct of_platform_driver pmc_driver = { | 80 | static struct platform_driver pmc_driver = { |
82 | .driver = { | 81 | .driver = { |
83 | .name = "pmc", | 82 | .name = "pmc", |
84 | .owner = THIS_MODULE, | 83 | .owner = THIS_MODULE, |
@@ -89,7 +88,7 @@ static struct of_platform_driver pmc_driver = { | |||
89 | 88 | ||
90 | static int __init pmc_init(void) | 89 | static int __init pmc_init(void) |
91 | { | 90 | { |
92 | return of_register_platform_driver(&pmc_driver); | 91 | return platform_driver_register(&pmc_driver); |
93 | } | 92 | } |
94 | 93 | ||
95 | /* This driver is not critical to the boot process | 94 | /* This driver is not critical to the boot process |
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c index 2c59f4d387dd..cd725fe238b2 100644 --- a/arch/sparc/kernel/power.c +++ b/arch/sparc/kernel/power.c | |||
@@ -33,7 +33,7 @@ static int __devinit has_button_interrupt(unsigned int irq, struct device_node * | |||
33 | return 1; | 33 | return 1; |
34 | } | 34 | } |
35 | 35 | ||
36 | static int __devinit power_probe(struct platform_device *op, const struct of_device_id *match) | 36 | static int __devinit power_probe(struct platform_device *op) |
37 | { | 37 | { |
38 | struct resource *res = &op->resource[0]; | 38 | struct resource *res = &op->resource[0]; |
39 | unsigned int irq = op->archdata.irqs[0]; | 39 | unsigned int irq = op->archdata.irqs[0]; |
@@ -59,7 +59,7 @@ static struct of_device_id __initdata power_match[] = { | |||
59 | {}, | 59 | {}, |
60 | }; | 60 | }; |
61 | 61 | ||
62 | static struct of_platform_driver power_driver = { | 62 | static struct platform_driver power_driver = { |
63 | .probe = power_probe, | 63 | .probe = power_probe, |
64 | .driver = { | 64 | .driver = { |
65 | .name = "power", | 65 | .name = "power", |
@@ -70,7 +70,7 @@ static struct of_platform_driver power_driver = { | |||
70 | 70 | ||
71 | static int __init power_init(void) | 71 | static int __init power_init(void) |
72 | { | 72 | { |
73 | return of_register_platform_driver(&power_driver); | 73 | return platform_driver_register(&power_driver); |
74 | } | 74 | } |
75 | 75 | ||
76 | device_initcall(power_init); | 76 | device_initcall(power_init); |
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index 9c743b1886ff..23ccd737fc79 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c | |||
@@ -142,7 +142,7 @@ static struct platform_device m48t59_rtc = { | |||
142 | }, | 142 | }, |
143 | }; | 143 | }; |
144 | 144 | ||
145 | static int __devinit clock_probe(struct platform_device *op, const struct of_device_id *match) | 145 | static int __devinit clock_probe(struct platform_device *op) |
146 | { | 146 | { |
147 | struct device_node *dp = op->dev.of_node; | 147 | struct device_node *dp = op->dev.of_node; |
148 | const char *model = of_get_property(dp, "model", NULL); | 148 | const char *model = of_get_property(dp, "model", NULL); |
@@ -176,7 +176,7 @@ static struct of_device_id __initdata clock_match[] = { | |||
176 | {}, | 176 | {}, |
177 | }; | 177 | }; |
178 | 178 | ||
179 | static struct of_platform_driver clock_driver = { | 179 | static struct platform_driver clock_driver = { |
180 | .probe = clock_probe, | 180 | .probe = clock_probe, |
181 | .driver = { | 181 | .driver = { |
182 | .name = "rtc", | 182 | .name = "rtc", |
@@ -189,7 +189,7 @@ static struct of_platform_driver clock_driver = { | |||
189 | /* Probe for the mostek real time clock chip. */ | 189 | /* Probe for the mostek real time clock chip. */ |
190 | static int __init clock_init(void) | 190 | static int __init clock_init(void) |
191 | { | 191 | { |
192 | return of_register_platform_driver(&clock_driver); | 192 | return platform_driver_register(&clock_driver); |
193 | } | 193 | } |
194 | /* Must be after subsys_initcall() so that busses are probed. Must | 194 | /* Must be after subsys_initcall() so that busses are probed. Must |
195 | * be before device_initcall() because things like the RTC driver | 195 | * be before device_initcall() because things like the RTC driver |
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index 3bc9c9979b92..e1862793a61d 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -419,7 +419,7 @@ static struct platform_device rtc_cmos_device = { | |||
419 | .num_resources = 1, | 419 | .num_resources = 1, |
420 | }; | 420 | }; |
421 | 421 | ||
422 | static int __devinit rtc_probe(struct platform_device *op, const struct of_device_id *match) | 422 | static int __devinit rtc_probe(struct platform_device *op) |
423 | { | 423 | { |
424 | struct resource *r; | 424 | struct resource *r; |
425 | 425 | ||
@@ -462,7 +462,7 @@ static struct of_device_id __initdata rtc_match[] = { | |||
462 | {}, | 462 | {}, |
463 | }; | 463 | }; |
464 | 464 | ||
465 | static struct of_platform_driver rtc_driver = { | 465 | static struct platform_driver rtc_driver = { |
466 | .probe = rtc_probe, | 466 | .probe = rtc_probe, |
467 | .driver = { | 467 | .driver = { |
468 | .name = "rtc", | 468 | .name = "rtc", |
@@ -477,7 +477,7 @@ static struct platform_device rtc_bq4802_device = { | |||
477 | .num_resources = 1, | 477 | .num_resources = 1, |
478 | }; | 478 | }; |
479 | 479 | ||
480 | static int __devinit bq4802_probe(struct platform_device *op, const struct of_device_id *match) | 480 | static int __devinit bq4802_probe(struct platform_device *op) |
481 | { | 481 | { |
482 | 482 | ||
483 | printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n", | 483 | printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n", |
@@ -495,7 +495,7 @@ static struct of_device_id __initdata bq4802_match[] = { | |||
495 | {}, | 495 | {}, |
496 | }; | 496 | }; |
497 | 497 | ||
498 | static struct of_platform_driver bq4802_driver = { | 498 | static struct platform_driver bq4802_driver = { |
499 | .probe = bq4802_probe, | 499 | .probe = bq4802_probe, |
500 | .driver = { | 500 | .driver = { |
501 | .name = "bq4802", | 501 | .name = "bq4802", |
@@ -534,7 +534,7 @@ static struct platform_device m48t59_rtc = { | |||
534 | }, | 534 | }, |
535 | }; | 535 | }; |
536 | 536 | ||
537 | static int __devinit mostek_probe(struct platform_device *op, const struct of_device_id *match) | 537 | static int __devinit mostek_probe(struct platform_device *op) |
538 | { | 538 | { |
539 | struct device_node *dp = op->dev.of_node; | 539 | struct device_node *dp = op->dev.of_node; |
540 | 540 | ||
@@ -559,7 +559,7 @@ static struct of_device_id __initdata mostek_match[] = { | |||
559 | {}, | 559 | {}, |
560 | }; | 560 | }; |
561 | 561 | ||
562 | static struct of_platform_driver mostek_driver = { | 562 | static struct platform_driver mostek_driver = { |
563 | .probe = mostek_probe, | 563 | .probe = mostek_probe, |
564 | .driver = { | 564 | .driver = { |
565 | .name = "mostek", | 565 | .name = "mostek", |
@@ -586,9 +586,9 @@ static int __init clock_init(void) | |||
586 | if (tlb_type == hypervisor) | 586 | if (tlb_type == hypervisor) |
587 | return platform_device_register(&rtc_sun4v_device); | 587 | return platform_device_register(&rtc_sun4v_device); |
588 | 588 | ||
589 | (void) of_register_platform_driver(&rtc_driver); | 589 | (void) platform_driver_register(&rtc_driver); |
590 | (void) of_register_platform_driver(&mostek_driver); | 590 | (void) platform_driver_register(&mostek_driver); |
591 | (void) of_register_platform_driver(&bq4802_driver); | 591 | (void) platform_driver_register(&bq4802_driver); |
592 | 592 | ||
593 | return 0; | 593 | return 0; |
594 | } | 594 | } |
diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c index a3f5e381e746..43ac61978d8b 100644 --- a/drivers/char/hw_random/n2-drv.c +++ b/drivers/char/hw_random/n2-drv.c | |||
@@ -619,15 +619,17 @@ static void __devinit n2rng_driver_version(void) | |||
619 | pr_info("%s", version); | 619 | pr_info("%s", version); |
620 | } | 620 | } |
621 | 621 | ||
622 | static int __devinit n2rng_probe(struct platform_device *op, | 622 | static int __devinit n2rng_probe(struct platform_device *op) |
623 | const struct of_device_id *match) | ||
624 | { | 623 | { |
625 | int victoria_falls = (match->data != NULL); | 624 | int victoria_falls; |
626 | int err = -ENOMEM; | 625 | int err = -ENOMEM; |
627 | struct n2rng *np; | 626 | struct n2rng *np; |
628 | 627 | ||
629 | n2rng_driver_version(); | 628 | if (!op->dev.of_match) |
629 | return -EINVAL; | ||
630 | victoria_falls = (op->dev.of_match->data != NULL); | ||
630 | 631 | ||
632 | n2rng_driver_version(); | ||
631 | np = kzalloc(sizeof(*np), GFP_KERNEL); | 633 | np = kzalloc(sizeof(*np), GFP_KERNEL); |
632 | if (!np) | 634 | if (!np) |
633 | goto out; | 635 | goto out; |
@@ -750,7 +752,7 @@ static const struct of_device_id n2rng_match[] = { | |||
750 | }; | 752 | }; |
751 | MODULE_DEVICE_TABLE(of, n2rng_match); | 753 | MODULE_DEVICE_TABLE(of, n2rng_match); |
752 | 754 | ||
753 | static struct of_platform_driver n2rng_driver = { | 755 | static struct platform_driver n2rng_driver = { |
754 | .driver = { | 756 | .driver = { |
755 | .name = "n2rng", | 757 | .name = "n2rng", |
756 | .owner = THIS_MODULE, | 758 | .owner = THIS_MODULE, |
@@ -762,12 +764,12 @@ static struct of_platform_driver n2rng_driver = { | |||
762 | 764 | ||
763 | static int __init n2rng_init(void) | 765 | static int __init n2rng_init(void) |
764 | { | 766 | { |
765 | return of_register_platform_driver(&n2rng_driver); | 767 | return platform_driver_register(&n2rng_driver); |
766 | } | 768 | } |
767 | 769 | ||
768 | static void __exit n2rng_exit(void) | 770 | static void __exit n2rng_exit(void) |
769 | { | 771 | { |
770 | of_unregister_platform_driver(&n2rng_driver); | 772 | platform_driver_unregister(&n2rng_driver); |
771 | } | 773 | } |
772 | 774 | ||
773 | module_init(n2rng_init); | 775 | module_init(n2rng_init); |
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c index 80dc094e78c6..2e5b2044c96f 100644 --- a/drivers/crypto/n2_core.c +++ b/drivers/crypto/n2_core.c | |||
@@ -2004,8 +2004,7 @@ static void __devinit n2_spu_driver_version(void) | |||
2004 | pr_info("%s", version); | 2004 | pr_info("%s", version); |
2005 | } | 2005 | } |
2006 | 2006 | ||
2007 | static int __devinit n2_crypto_probe(struct platform_device *dev, | 2007 | static int __devinit n2_crypto_probe(struct platform_device *dev) |
2008 | const struct of_device_id *match) | ||
2009 | { | 2008 | { |
2010 | struct mdesc_handle *mdesc; | 2009 | struct mdesc_handle *mdesc; |
2011 | const char *full_name; | 2010 | const char *full_name; |
@@ -2116,8 +2115,7 @@ static void free_ncp(struct n2_mau *mp) | |||
2116 | kfree(mp); | 2115 | kfree(mp); |
2117 | } | 2116 | } |
2118 | 2117 | ||
2119 | static int __devinit n2_mau_probe(struct platform_device *dev, | 2118 | static int __devinit n2_mau_probe(struct platform_device *dev) |
2120 | const struct of_device_id *match) | ||
2121 | { | 2119 | { |
2122 | struct mdesc_handle *mdesc; | 2120 | struct mdesc_handle *mdesc; |
2123 | const char *full_name; | 2121 | const char *full_name; |
@@ -2211,7 +2209,7 @@ static struct of_device_id n2_crypto_match[] = { | |||
2211 | 2209 | ||
2212 | MODULE_DEVICE_TABLE(of, n2_crypto_match); | 2210 | MODULE_DEVICE_TABLE(of, n2_crypto_match); |
2213 | 2211 | ||
2214 | static struct of_platform_driver n2_crypto_driver = { | 2212 | static struct platform_driver n2_crypto_driver = { |
2215 | .driver = { | 2213 | .driver = { |
2216 | .name = "n2cp", | 2214 | .name = "n2cp", |
2217 | .owner = THIS_MODULE, | 2215 | .owner = THIS_MODULE, |
@@ -2235,7 +2233,7 @@ static struct of_device_id n2_mau_match[] = { | |||
2235 | 2233 | ||
2236 | MODULE_DEVICE_TABLE(of, n2_mau_match); | 2234 | MODULE_DEVICE_TABLE(of, n2_mau_match); |
2237 | 2235 | ||
2238 | static struct of_platform_driver n2_mau_driver = { | 2236 | static struct platform_driver n2_mau_driver = { |
2239 | .driver = { | 2237 | .driver = { |
2240 | .name = "ncp", | 2238 | .name = "ncp", |
2241 | .owner = THIS_MODULE, | 2239 | .owner = THIS_MODULE, |
@@ -2247,20 +2245,20 @@ static struct of_platform_driver n2_mau_driver = { | |||
2247 | 2245 | ||
2248 | static int __init n2_init(void) | 2246 | static int __init n2_init(void) |
2249 | { | 2247 | { |
2250 | int err = of_register_platform_driver(&n2_crypto_driver); | 2248 | int err = platform_driver_register(&n2_crypto_driver); |
2251 | 2249 | ||
2252 | if (!err) { | 2250 | if (!err) { |
2253 | err = of_register_platform_driver(&n2_mau_driver); | 2251 | err = platform_driver_register(&n2_mau_driver); |
2254 | if (err) | 2252 | if (err) |
2255 | of_unregister_platform_driver(&n2_crypto_driver); | 2253 | platform_driver_unregister(&n2_crypto_driver); |
2256 | } | 2254 | } |
2257 | return err; | 2255 | return err; |
2258 | } | 2256 | } |
2259 | 2257 | ||
2260 | static void __exit n2_exit(void) | 2258 | static void __exit n2_exit(void) |
2261 | { | 2259 | { |
2262 | of_unregister_platform_driver(&n2_mau_driver); | 2260 | platform_driver_unregister(&n2_mau_driver); |
2263 | of_unregister_platform_driver(&n2_crypto_driver); | 2261 | platform_driver_unregister(&n2_crypto_driver); |
2264 | } | 2262 | } |
2265 | 2263 | ||
2266 | module_init(n2_init); | 2264 | module_init(n2_init); |
diff --git a/drivers/hwmon/ultra45_env.c b/drivers/hwmon/ultra45_env.c index d863e13a50b8..1f36c635d933 100644 --- a/drivers/hwmon/ultra45_env.c +++ b/drivers/hwmon/ultra45_env.c | |||
@@ -234,8 +234,7 @@ static const struct attribute_group env_group = { | |||
234 | .attrs = env_attributes, | 234 | .attrs = env_attributes, |
235 | }; | 235 | }; |
236 | 236 | ||
237 | static int __devinit env_probe(struct platform_device *op, | 237 | static int __devinit env_probe(struct platform_device *op) |
238 | const struct of_device_id *match) | ||
239 | { | 238 | { |
240 | struct env *p = kzalloc(sizeof(*p), GFP_KERNEL); | 239 | struct env *p = kzalloc(sizeof(*p), GFP_KERNEL); |
241 | int err = -ENOMEM; | 240 | int err = -ENOMEM; |
@@ -299,7 +298,7 @@ static const struct of_device_id env_match[] = { | |||
299 | }; | 298 | }; |
300 | MODULE_DEVICE_TABLE(of, env_match); | 299 | MODULE_DEVICE_TABLE(of, env_match); |
301 | 300 | ||
302 | static struct of_platform_driver env_driver = { | 301 | static struct platform_driver env_driver = { |
303 | .driver = { | 302 | .driver = { |
304 | .name = "ultra45_env", | 303 | .name = "ultra45_env", |
305 | .owner = THIS_MODULE, | 304 | .owner = THIS_MODULE, |
@@ -311,12 +310,12 @@ static struct of_platform_driver env_driver = { | |||
311 | 310 | ||
312 | static int __init env_init(void) | 311 | static int __init env_init(void) |
313 | { | 312 | { |
314 | return of_register_platform_driver(&env_driver); | 313 | return platform_driver_register(&env_driver); |
315 | } | 314 | } |
316 | 315 | ||
317 | static void __exit env_exit(void) | 316 | static void __exit env_exit(void) |
318 | { | 317 | { |
319 | of_unregister_platform_driver(&env_driver); | 318 | platform_driver_unregister(&env_driver); |
320 | } | 319 | } |
321 | 320 | ||
322 | module_init(env_init); | 321 | module_init(env_init); |
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c index 8e130bf7d32b..0122f5351577 100644 --- a/drivers/input/misc/sparcspkr.c +++ b/drivers/input/misc/sparcspkr.c | |||
@@ -173,18 +173,16 @@ static int __devinit sparcspkr_probe(struct device *dev) | |||
173 | return 0; | 173 | return 0; |
174 | } | 174 | } |
175 | 175 | ||
176 | static int sparcspkr_shutdown(struct platform_device *dev) | 176 | static void sparcspkr_shutdown(struct platform_device *dev) |
177 | { | 177 | { |
178 | struct sparcspkr_state *state = dev_get_drvdata(&dev->dev); | 178 | struct sparcspkr_state *state = dev_get_drvdata(&dev->dev); |
179 | struct input_dev *input_dev = state->input_dev; | 179 | struct input_dev *input_dev = state->input_dev; |
180 | 180 | ||
181 | /* turn off the speaker */ | 181 | /* turn off the speaker */ |
182 | state->event(input_dev, EV_SND, SND_BELL, 0); | 182 | state->event(input_dev, EV_SND, SND_BELL, 0); |
183 | |||
184 | return 0; | ||
185 | } | 183 | } |
186 | 184 | ||
187 | static int __devinit bbc_beep_probe(struct platform_device *op, const struct of_device_id *match) | 185 | static int __devinit bbc_beep_probe(struct platform_device *op) |
188 | { | 186 | { |
189 | struct sparcspkr_state *state; | 187 | struct sparcspkr_state *state; |
190 | struct bbc_beep_info *info; | 188 | struct bbc_beep_info *info; |
@@ -258,7 +256,7 @@ static const struct of_device_id bbc_beep_match[] = { | |||
258 | {}, | 256 | {}, |
259 | }; | 257 | }; |
260 | 258 | ||
261 | static struct of_platform_driver bbc_beep_driver = { | 259 | static struct platform_driver bbc_beep_driver = { |
262 | .driver = { | 260 | .driver = { |
263 | .name = "bbcbeep", | 261 | .name = "bbcbeep", |
264 | .owner = THIS_MODULE, | 262 | .owner = THIS_MODULE, |
@@ -269,7 +267,7 @@ static struct of_platform_driver bbc_beep_driver = { | |||
269 | .shutdown = sparcspkr_shutdown, | 267 | .shutdown = sparcspkr_shutdown, |
270 | }; | 268 | }; |
271 | 269 | ||
272 | static int __devinit grover_beep_probe(struct platform_device *op, const struct of_device_id *match) | 270 | static int __devinit grover_beep_probe(struct platform_device *op) |
273 | { | 271 | { |
274 | struct sparcspkr_state *state; | 272 | struct sparcspkr_state *state; |
275 | struct grover_beep_info *info; | 273 | struct grover_beep_info *info; |
@@ -340,7 +338,7 @@ static const struct of_device_id grover_beep_match[] = { | |||
340 | {}, | 338 | {}, |
341 | }; | 339 | }; |
342 | 340 | ||
343 | static struct of_platform_driver grover_beep_driver = { | 341 | static struct platform_driver grover_beep_driver = { |
344 | .driver = { | 342 | .driver = { |
345 | .name = "groverbeep", | 343 | .name = "groverbeep", |
346 | .owner = THIS_MODULE, | 344 | .owner = THIS_MODULE, |
@@ -353,12 +351,12 @@ static struct of_platform_driver grover_beep_driver = { | |||
353 | 351 | ||
354 | static int __init sparcspkr_init(void) | 352 | static int __init sparcspkr_init(void) |
355 | { | 353 | { |
356 | int err = of_register_platform_driver(&bbc_beep_driver); | 354 | int err = platform_driver_register(&bbc_beep_driver); |
357 | 355 | ||
358 | if (!err) { | 356 | if (!err) { |
359 | err = of_register_platform_driver(&grover_beep_driver); | 357 | err = platform_driver_register(&grover_beep_driver); |
360 | if (err) | 358 | if (err) |
361 | of_unregister_platform_driver(&bbc_beep_driver); | 359 | platform_driver_unregister(&bbc_beep_driver); |
362 | } | 360 | } |
363 | 361 | ||
364 | return err; | 362 | return err; |
@@ -366,8 +364,8 @@ static int __init sparcspkr_init(void) | |||
366 | 364 | ||
367 | static void __exit sparcspkr_exit(void) | 365 | static void __exit sparcspkr_exit(void) |
368 | { | 366 | { |
369 | of_unregister_platform_driver(&bbc_beep_driver); | 367 | platform_driver_unregister(&bbc_beep_driver); |
370 | of_unregister_platform_driver(&grover_beep_driver); | 368 | platform_driver_unregister(&grover_beep_driver); |
371 | } | 369 | } |
372 | 370 | ||
373 | module_init(sparcspkr_init); | 371 | module_init(sparcspkr_init); |
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h index c5cc4508d6df..395a9af3adcd 100644 --- a/drivers/input/serio/i8042-sparcio.h +++ b/drivers/input/serio/i8042-sparcio.h | |||
@@ -49,7 +49,7 @@ static inline void i8042_write_command(int val) | |||
49 | #define OBP_PS2MS_NAME1 "kdmouse" | 49 | #define OBP_PS2MS_NAME1 "kdmouse" |
50 | #define OBP_PS2MS_NAME2 "mouse" | 50 | #define OBP_PS2MS_NAME2 "mouse" |
51 | 51 | ||
52 | static int __devinit sparc_i8042_probe(struct platform_device *op, const struct of_device_id *match) | 52 | static int __devinit sparc_i8042_probe(struct platform_device *op) |
53 | { | 53 | { |
54 | struct device_node *dp = op->dev.of_node; | 54 | struct device_node *dp = op->dev.of_node; |
55 | 55 | ||
@@ -95,7 +95,7 @@ static const struct of_device_id sparc_i8042_match[] = { | |||
95 | }; | 95 | }; |
96 | MODULE_DEVICE_TABLE(of, sparc_i8042_match); | 96 | MODULE_DEVICE_TABLE(of, sparc_i8042_match); |
97 | 97 | ||
98 | static struct of_platform_driver sparc_i8042_driver = { | 98 | static struct platform_driver sparc_i8042_driver = { |
99 | .driver = { | 99 | .driver = { |
100 | .name = "i8042", | 100 | .name = "i8042", |
101 | .owner = THIS_MODULE, | 101 | .owner = THIS_MODULE, |
@@ -116,7 +116,7 @@ static int __init i8042_platform_init(void) | |||
116 | if (!kbd_iobase) | 116 | if (!kbd_iobase) |
117 | return -ENODEV; | 117 | return -ENODEV; |
118 | } else { | 118 | } else { |
119 | int err = of_register_platform_driver(&sparc_i8042_driver); | 119 | int err = platform_driver_register(&sparc_i8042_driver); |
120 | if (err) | 120 | if (err) |
121 | return err; | 121 | return err; |
122 | 122 | ||
@@ -140,7 +140,7 @@ static inline void i8042_platform_exit(void) | |||
140 | struct device_node *root = of_find_node_by_path("/"); | 140 | struct device_node *root = of_find_node_by_path("/"); |
141 | 141 | ||
142 | if (strcmp(root->name, "SUNW,JavaStation-1")) | 142 | if (strcmp(root->name, "SUNW,JavaStation-1")) |
143 | of_unregister_platform_driver(&sparc_i8042_driver); | 143 | platform_driver_unregister(&sparc_i8042_driver); |
144 | } | 144 | } |
145 | 145 | ||
146 | #else /* !CONFIG_PCI */ | 146 | #else /* !CONFIG_PCI */ |
diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c index 55ba118f1cf1..910c5a26e347 100644 --- a/drivers/parport/parport_sunbpp.c +++ b/drivers/parport/parport_sunbpp.c | |||
@@ -286,7 +286,7 @@ static struct parport_operations parport_sunbpp_ops = | |||
286 | .owner = THIS_MODULE, | 286 | .owner = THIS_MODULE, |
287 | }; | 287 | }; |
288 | 288 | ||
289 | static int __devinit bpp_probe(struct platform_device *op, const struct of_device_id *match) | 289 | static int __devinit bpp_probe(struct platform_device *op) |
290 | { | 290 | { |
291 | struct parport_operations *ops; | 291 | struct parport_operations *ops; |
292 | struct bpp_regs __iomem *regs; | 292 | struct bpp_regs __iomem *regs; |
@@ -381,7 +381,7 @@ static const struct of_device_id bpp_match[] = { | |||
381 | 381 | ||
382 | MODULE_DEVICE_TABLE(of, bpp_match); | 382 | MODULE_DEVICE_TABLE(of, bpp_match); |
383 | 383 | ||
384 | static struct of_platform_driver bpp_sbus_driver = { | 384 | static struct platform_driver bpp_sbus_driver = { |
385 | .driver = { | 385 | .driver = { |
386 | .name = "bpp", | 386 | .name = "bpp", |
387 | .owner = THIS_MODULE, | 387 | .owner = THIS_MODULE, |
@@ -393,12 +393,12 @@ static struct of_platform_driver bpp_sbus_driver = { | |||
393 | 393 | ||
394 | static int __init parport_sunbpp_init(void) | 394 | static int __init parport_sunbpp_init(void) |
395 | { | 395 | { |
396 | return of_register_platform_driver(&bpp_sbus_driver); | 396 | return platform_driver_register(&bpp_sbus_driver); |
397 | } | 397 | } |
398 | 398 | ||
399 | static void __exit parport_sunbpp_exit(void) | 399 | static void __exit parport_sunbpp_exit(void) |
400 | { | 400 | { |
401 | of_unregister_platform_driver(&bpp_sbus_driver); | 401 | platform_driver_unregister(&bpp_sbus_driver); |
402 | } | 402 | } |
403 | 403 | ||
404 | MODULE_AUTHOR("Derrick J Brashear"); | 404 | MODULE_AUTHOR("Derrick J Brashear"); |
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 614a5e114a19..5f94d22c491e 100644 --- a/drivers/sbus/char/bbc_i2c.c +++ b/drivers/sbus/char/bbc_i2c.c | |||
@@ -361,8 +361,7 @@ fail: | |||
361 | extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); | 361 | extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); |
362 | extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); | 362 | extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); |
363 | 363 | ||
364 | static int __devinit bbc_i2c_probe(struct platform_device *op, | 364 | static int __devinit bbc_i2c_probe(struct platform_device *op) |
365 | const struct of_device_id *match) | ||
366 | { | 365 | { |
367 | struct bbc_i2c_bus *bp; | 366 | struct bbc_i2c_bus *bp; |
368 | int err, index = 0; | 367 | int err, index = 0; |
@@ -413,7 +412,7 @@ static const struct of_device_id bbc_i2c_match[] = { | |||
413 | }; | 412 | }; |
414 | MODULE_DEVICE_TABLE(of, bbc_i2c_match); | 413 | MODULE_DEVICE_TABLE(of, bbc_i2c_match); |
415 | 414 | ||
416 | static struct of_platform_driver bbc_i2c_driver = { | 415 | static struct platform_driver bbc_i2c_driver = { |
417 | .driver = { | 416 | .driver = { |
418 | .name = "bbc_i2c", | 417 | .name = "bbc_i2c", |
419 | .owner = THIS_MODULE, | 418 | .owner = THIS_MODULE, |
@@ -425,12 +424,12 @@ static struct of_platform_driver bbc_i2c_driver = { | |||
425 | 424 | ||
426 | static int __init bbc_i2c_init(void) | 425 | static int __init bbc_i2c_init(void) |
427 | { | 426 | { |
428 | return of_register_platform_driver(&bbc_i2c_driver); | 427 | return platform_driver_register(&bbc_i2c_driver); |
429 | } | 428 | } |
430 | 429 | ||
431 | static void __exit bbc_i2c_exit(void) | 430 | static void __exit bbc_i2c_exit(void) |
432 | { | 431 | { |
433 | of_unregister_platform_driver(&bbc_i2c_driver); | 432 | platform_driver_unregister(&bbc_i2c_driver); |
434 | } | 433 | } |
435 | 434 | ||
436 | module_init(bbc_i2c_init); | 435 | module_init(bbc_i2c_init); |
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index 55f71ea9c418..740da4465447 100644 --- a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c | |||
@@ -171,8 +171,7 @@ static struct miscdevice d7s_miscdev = { | |||
171 | .fops = &d7s_fops | 171 | .fops = &d7s_fops |
172 | }; | 172 | }; |
173 | 173 | ||
174 | static int __devinit d7s_probe(struct platform_device *op, | 174 | static int __devinit d7s_probe(struct platform_device *op) |
175 | const struct of_device_id *match) | ||
176 | { | 175 | { |
177 | struct device_node *opts; | 176 | struct device_node *opts; |
178 | int err = -EINVAL; | 177 | int err = -EINVAL; |
@@ -266,7 +265,7 @@ static const struct of_device_id d7s_match[] = { | |||
266 | }; | 265 | }; |
267 | MODULE_DEVICE_TABLE(of, d7s_match); | 266 | MODULE_DEVICE_TABLE(of, d7s_match); |
268 | 267 | ||
269 | static struct of_platform_driver d7s_driver = { | 268 | static struct platform_driver d7s_driver = { |
270 | .driver = { | 269 | .driver = { |
271 | .name = DRIVER_NAME, | 270 | .name = DRIVER_NAME, |
272 | .owner = THIS_MODULE, | 271 | .owner = THIS_MODULE, |
@@ -278,12 +277,12 @@ static struct of_platform_driver d7s_driver = { | |||
278 | 277 | ||
279 | static int __init d7s_init(void) | 278 | static int __init d7s_init(void) |
280 | { | 279 | { |
281 | return of_register_platform_driver(&d7s_driver); | 280 | return platform_driver_register(&d7s_driver); |
282 | } | 281 | } |
283 | 282 | ||
284 | static void __exit d7s_exit(void) | 283 | static void __exit d7s_exit(void) |
285 | { | 284 | { |
286 | of_unregister_platform_driver(&d7s_driver); | 285 | platform_driver_unregister(&d7s_driver); |
287 | } | 286 | } |
288 | 287 | ||
289 | module_init(d7s_init); | 288 | module_init(d7s_init); |
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index 8ce414e39489..be7b4e56154f 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
@@ -1028,8 +1028,7 @@ static int kenvctrld(void *__unused) | |||
1028 | return 0; | 1028 | return 0; |
1029 | } | 1029 | } |
1030 | 1030 | ||
1031 | static int __devinit envctrl_probe(struct platform_device *op, | 1031 | static int __devinit envctrl_probe(struct platform_device *op) |
1032 | const struct of_device_id *match) | ||
1033 | { | 1032 | { |
1034 | struct device_node *dp; | 1033 | struct device_node *dp; |
1035 | int index, err; | 1034 | int index, err; |
@@ -1129,7 +1128,7 @@ static const struct of_device_id envctrl_match[] = { | |||
1129 | }; | 1128 | }; |
1130 | MODULE_DEVICE_TABLE(of, envctrl_match); | 1129 | MODULE_DEVICE_TABLE(of, envctrl_match); |
1131 | 1130 | ||
1132 | static struct of_platform_driver envctrl_driver = { | 1131 | static struct platform_driver envctrl_driver = { |
1133 | .driver = { | 1132 | .driver = { |
1134 | .name = DRIVER_NAME, | 1133 | .name = DRIVER_NAME, |
1135 | .owner = THIS_MODULE, | 1134 | .owner = THIS_MODULE, |
@@ -1141,12 +1140,12 @@ static struct of_platform_driver envctrl_driver = { | |||
1141 | 1140 | ||
1142 | static int __init envctrl_init(void) | 1141 | static int __init envctrl_init(void) |
1143 | { | 1142 | { |
1144 | return of_register_platform_driver(&envctrl_driver); | 1143 | return platform_driver_register(&envctrl_driver); |
1145 | } | 1144 | } |
1146 | 1145 | ||
1147 | static void __exit envctrl_exit(void) | 1146 | static void __exit envctrl_exit(void) |
1148 | { | 1147 | { |
1149 | of_unregister_platform_driver(&envctrl_driver); | 1148 | platform_driver_unregister(&envctrl_driver); |
1150 | } | 1149 | } |
1151 | 1150 | ||
1152 | module_init(envctrl_init); | 1151 | module_init(envctrl_init); |
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 2b4b4b613c48..73dd4e7afaaa 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c | |||
@@ -160,8 +160,7 @@ static const struct file_operations flash_fops = { | |||
160 | 160 | ||
161 | static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; | 161 | static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; |
162 | 162 | ||
163 | static int __devinit flash_probe(struct platform_device *op, | 163 | static int __devinit flash_probe(struct platform_device *op) |
164 | const struct of_device_id *match) | ||
165 | { | 164 | { |
166 | struct device_node *dp = op->dev.of_node; | 165 | struct device_node *dp = op->dev.of_node; |
167 | struct device_node *parent; | 166 | struct device_node *parent; |
@@ -207,7 +206,7 @@ static const struct of_device_id flash_match[] = { | |||
207 | }; | 206 | }; |
208 | MODULE_DEVICE_TABLE(of, flash_match); | 207 | MODULE_DEVICE_TABLE(of, flash_match); |
209 | 208 | ||
210 | static struct of_platform_driver flash_driver = { | 209 | static struct platform_driver flash_driver = { |
211 | .driver = { | 210 | .driver = { |
212 | .name = "flash", | 211 | .name = "flash", |
213 | .owner = THIS_MODULE, | 212 | .owner = THIS_MODULE, |
@@ -219,12 +218,12 @@ static struct of_platform_driver flash_driver = { | |||
219 | 218 | ||
220 | static int __init flash_init(void) | 219 | static int __init flash_init(void) |
221 | { | 220 | { |
222 | return of_register_platform_driver(&flash_driver); | 221 | return platform_driver_register(&flash_driver); |
223 | } | 222 | } |
224 | 223 | ||
225 | static void __exit flash_cleanup(void) | 224 | static void __exit flash_cleanup(void) |
226 | { | 225 | { |
227 | of_unregister_platform_driver(&flash_driver); | 226 | platform_driver_unregister(&flash_driver); |
228 | } | 227 | } |
229 | 228 | ||
230 | module_init(flash_init); | 229 | module_init(flash_init); |
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index 1b345be5cc02..ebce9639a26a 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c | |||
@@ -348,8 +348,7 @@ static void uctrl_get_external_status(struct uctrl_driver *driver) | |||
348 | 348 | ||
349 | } | 349 | } |
350 | 350 | ||
351 | static int __devinit uctrl_probe(struct platform_device *op, | 351 | static int __devinit uctrl_probe(struct platform_device *op) |
352 | const struct of_device_id *match) | ||
353 | { | 352 | { |
354 | struct uctrl_driver *p; | 353 | struct uctrl_driver *p; |
355 | int err = -ENOMEM; | 354 | int err = -ENOMEM; |
@@ -425,7 +424,7 @@ static const struct of_device_id uctrl_match[] = { | |||
425 | }; | 424 | }; |
426 | MODULE_DEVICE_TABLE(of, uctrl_match); | 425 | MODULE_DEVICE_TABLE(of, uctrl_match); |
427 | 426 | ||
428 | static struct of_platform_driver uctrl_driver = { | 427 | static struct platform_driver uctrl_driver = { |
429 | .driver = { | 428 | .driver = { |
430 | .name = "uctrl", | 429 | .name = "uctrl", |
431 | .owner = THIS_MODULE, | 430 | .owner = THIS_MODULE, |
@@ -438,12 +437,12 @@ static struct of_platform_driver uctrl_driver = { | |||
438 | 437 | ||
439 | static int __init uctrl_init(void) | 438 | static int __init uctrl_init(void) |
440 | { | 439 | { |
441 | return of_register_platform_driver(&uctrl_driver); | 440 | return platform_driver_register(&uctrl_driver); |
442 | } | 441 | } |
443 | 442 | ||
444 | static void __exit uctrl_exit(void) | 443 | static void __exit uctrl_exit(void) |
445 | { | 444 | { |
446 | of_unregister_platform_driver(&uctrl_driver); | 445 | platform_driver_unregister(&uctrl_driver); |
447 | } | 446 | } |
448 | 447 | ||
449 | module_init(uctrl_init); | 448 | module_init(uctrl_init); |
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 664c9572d0c9..e2d45c91b8e8 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c | |||
@@ -1292,15 +1292,19 @@ static struct scsi_host_template qpti_template = { | |||
1292 | .use_clustering = ENABLE_CLUSTERING, | 1292 | .use_clustering = ENABLE_CLUSTERING, |
1293 | }; | 1293 | }; |
1294 | 1294 | ||
1295 | static int __devinit qpti_sbus_probe(struct platform_device *op, const struct of_device_id *match) | 1295 | static int __devinit qpti_sbus_probe(struct platform_device *op) |
1296 | { | 1296 | { |
1297 | struct scsi_host_template *tpnt = match->data; | 1297 | struct scsi_host_template *tpnt; |
1298 | struct device_node *dp = op->dev.of_node; | 1298 | struct device_node *dp = op->dev.of_node; |
1299 | struct Scsi_Host *host; | 1299 | struct Scsi_Host *host; |
1300 | struct qlogicpti *qpti; | 1300 | struct qlogicpti *qpti; |
1301 | static int nqptis; | 1301 | static int nqptis; |
1302 | const char *fcode; | 1302 | const char *fcode; |
1303 | 1303 | ||
1304 | if (!op->dev.of_match) | ||
1305 | return -EINVAL; | ||
1306 | tpnt = op->dev.of_match->data; | ||
1307 | |||
1304 | /* Sometimes Antares cards come up not completely | 1308 | /* Sometimes Antares cards come up not completely |
1305 | * setup, and we get a report of a zero IRQ. | 1309 | * setup, and we get a report of a zero IRQ. |
1306 | */ | 1310 | */ |
@@ -1457,7 +1461,7 @@ static const struct of_device_id qpti_match[] = { | |||
1457 | }; | 1461 | }; |
1458 | MODULE_DEVICE_TABLE(of, qpti_match); | 1462 | MODULE_DEVICE_TABLE(of, qpti_match); |
1459 | 1463 | ||
1460 | static struct of_platform_driver qpti_sbus_driver = { | 1464 | static struct platform_driver qpti_sbus_driver = { |
1461 | .driver = { | 1465 | .driver = { |
1462 | .name = "qpti", | 1466 | .name = "qpti", |
1463 | .owner = THIS_MODULE, | 1467 | .owner = THIS_MODULE, |
@@ -1469,12 +1473,12 @@ static struct of_platform_driver qpti_sbus_driver = { | |||
1469 | 1473 | ||
1470 | static int __init qpti_init(void) | 1474 | static int __init qpti_init(void) |
1471 | { | 1475 | { |
1472 | return of_register_platform_driver(&qpti_sbus_driver); | 1476 | return platform_driver_register(&qpti_sbus_driver); |
1473 | } | 1477 | } |
1474 | 1478 | ||
1475 | static void __exit qpti_exit(void) | 1479 | static void __exit qpti_exit(void) |
1476 | { | 1480 | { |
1477 | of_unregister_platform_driver(&qpti_sbus_driver); | 1481 | platform_driver_unregister(&qpti_sbus_driver); |
1478 | } | 1482 | } |
1479 | 1483 | ||
1480 | MODULE_DESCRIPTION("QlogicISP SBUS driver"); | 1484 | MODULE_DESCRIPTION("QlogicISP SBUS driver"); |
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c index 193b37ba1834..676fe9ac7f61 100644 --- a/drivers/scsi/sun_esp.c +++ b/drivers/scsi/sun_esp.c | |||
@@ -562,7 +562,7 @@ fail: | |||
562 | return err; | 562 | return err; |
563 | } | 563 | } |
564 | 564 | ||
565 | static int __devinit esp_sbus_probe(struct platform_device *op, const struct of_device_id *match) | 565 | static int __devinit esp_sbus_probe(struct platform_device *op) |
566 | { | 566 | { |
567 | struct device_node *dma_node = NULL; | 567 | struct device_node *dma_node = NULL; |
568 | struct device_node *dp = op->dev.of_node; | 568 | struct device_node *dp = op->dev.of_node; |
@@ -632,7 +632,7 @@ static const struct of_device_id esp_match[] = { | |||
632 | }; | 632 | }; |
633 | MODULE_DEVICE_TABLE(of, esp_match); | 633 | MODULE_DEVICE_TABLE(of, esp_match); |
634 | 634 | ||
635 | static struct of_platform_driver esp_sbus_driver = { | 635 | static struct platform_driver esp_sbus_driver = { |
636 | .driver = { | 636 | .driver = { |
637 | .name = "esp", | 637 | .name = "esp", |
638 | .owner = THIS_MODULE, | 638 | .owner = THIS_MODULE, |
@@ -644,12 +644,12 @@ static struct of_platform_driver esp_sbus_driver = { | |||
644 | 644 | ||
645 | static int __init sunesp_init(void) | 645 | static int __init sunesp_init(void) |
646 | { | 646 | { |
647 | return of_register_platform_driver(&esp_sbus_driver); | 647 | return platform_driver_register(&esp_sbus_driver); |
648 | } | 648 | } |
649 | 649 | ||
650 | static void __exit sunesp_exit(void) | 650 | static void __exit sunesp_exit(void) |
651 | { | 651 | { |
652 | of_unregister_platform_driver(&esp_sbus_driver); | 652 | platform_driver_unregister(&esp_sbus_driver); |
653 | } | 653 | } |
654 | 654 | ||
655 | MODULE_DESCRIPTION("Sun ESP SCSI driver"); | 655 | MODULE_DESCRIPTION("Sun ESP SCSI driver"); |