aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/include/asm/parport.h6
-rw-r--r--arch/sparc/kernel/apc.c7
-rw-r--r--arch/sparc/kernel/auxio_64.c7
-rw-r--r--arch/sparc/kernel/central.c14
-rw-r--r--arch/sparc/kernel/chmc.c19
-rw-r--r--arch/sparc/kernel/pci_fire.c7
-rw-r--r--arch/sparc/kernel/pci_psycho.c7
-rw-r--r--arch/sparc/kernel/pci_sabre.c9
-rw-r--r--arch/sparc/kernel/pci_schizo.c11
-rw-r--r--arch/sparc/kernel/pci_sun4v.c7
-rw-r--r--arch/sparc/kernel/pmc.c7
-rw-r--r--arch/sparc/kernel/power.c6
-rw-r--r--arch/sparc/kernel/time_32.c6
-rw-r--r--arch/sparc/kernel/time_64.c18
-rw-r--r--drivers/char/hw_random/n2-drv.c16
-rw-r--r--drivers/crypto/n2_core.c20
-rw-r--r--drivers/hwmon/ultra45_env.c9
-rw-r--r--drivers/input/misc/sparcspkr.c22
-rw-r--r--drivers/input/serio/i8042-sparcio.h8
-rw-r--r--drivers/parport/parport_sunbpp.c8
-rw-r--r--drivers/sbus/char/bbc_i2c.c9
-rw-r--r--drivers/sbus/char/display7seg.c9
-rw-r--r--drivers/sbus/char/envctrl.c9
-rw-r--r--drivers/sbus/char/flash.c9
-rw-r--r--drivers/sbus/char/uctrl.c9
-rw-r--r--drivers/scsi/qlogicpti.c14
-rw-r--r--drivers/scsi/sun_esp.c8
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
106static int __devinit ecpp_probe(struct platform_device *op, const struct of_device_id *match) 106static 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
238static struct of_platform_driver ecpp_driver = { 238static 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
248static int parport_pc_find_nonpci_ports(int autoirq, int autodma) 248static 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
138static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; 138static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops };
139 139
140static int __devinit apc_probe(struct platform_device *op, 140static 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};
175MODULE_DEVICE_TABLE(of, apc_match); 174MODULE_DEVICE_TABLE(of, apc_match);
176 175
177static struct of_platform_driver apc_driver = { 176static 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
186static int __init apc_init(void) 185static 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
103MODULE_DEVICE_TABLE(of, auxio_match); 103MODULE_DEVICE_TABLE(of, auxio_match);
104 104
105static int __devinit auxio_probe(struct platform_device *dev, 105static 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
135static struct of_platform_driver auxio_driver = { 134static 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
144static int __init auxio_init(void) 143static 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
62static int __devinit clock_board_probe(struct platform_device *op, 62static 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
151static struct of_platform_driver clock_board_driver = { 150static 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
160static int __devinit fhc_probe(struct platform_device *op, 159static 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
257static struct of_platform_driver fhc_driver = { 255static 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
266static int __init sunfire_init(void) 264static 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
395static int __devinit jbusmc_probe(struct platform_device *op, 395static 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
693static int __devinit chmc_probe(struct platform_device *op, 692static 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
768static int __devinit us3mc_probe(struct platform_device *op, 766static 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};
811MODULE_DEVICE_TABLE(of, us3mc_match); 808MODULE_DEVICE_TABLE(of, us3mc_match);
812 809
813static struct of_platform_driver us3mc_driver = { 810static 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
458static int __devinit fire_probe(struct platform_device *op, 458static 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
510static struct of_platform_driver fire_driver = { 509static 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
519static int __init fire_init(void) 518static 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
524subsys_initcall(fire_init); 523subsys_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
506static int __devinit psycho_probe(struct platform_device *op, 506static 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
604static struct of_platform_driver psycho_driver = { 603static 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
613static int __init psycho_init(void) 612static 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
618subsys_initcall(psycho_init); 617subsys_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
455static int __devinit sabre_probe(struct platform_device *op, 455static 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
598static struct of_platform_driver sabre_driver = { 597static 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
607static int __init sabre_init(void) 606static 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
612subsys_initcall(sabre_init); 611subsys_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
1463static int __devinit schizo_probe(struct platform_device *op, 1463static 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
1493static struct of_platform_driver schizo_driver = { 1494static 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
1502static int __init schizo_init(void) 1503static 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
1507subsys_initcall(schizo_init); 1508subsys_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
921static int __devinit pci_sun4v_probe(struct platform_device *op, 921static 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
1011static struct of_platform_driver pci_sun4v_driver = { 1010static 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
1020static int __init pci_sun4v_init(void) 1019static 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
1025subsys_initcall(pci_sun4v_init); 1024subsys_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
54static int __devinit pmc_probe(struct platform_device *op, 54static 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};
79MODULE_DEVICE_TABLE(of, pmc_match); 78MODULE_DEVICE_TABLE(of, pmc_match);
80 79
81static struct of_platform_driver pmc_driver = { 80static 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
90static int __init pmc_init(void) 89static 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
36static int __devinit power_probe(struct platform_device *op, const struct of_device_id *match) 36static 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
62static struct of_platform_driver power_driver = { 62static 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
71static int __init power_init(void) 71static 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
76device_initcall(power_init); 76device_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
145static int __devinit clock_probe(struct platform_device *op, const struct of_device_id *match) 145static 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
179static struct of_platform_driver clock_driver = { 179static 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. */
190static int __init clock_init(void) 190static 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
422static int __devinit rtc_probe(struct platform_device *op, const struct of_device_id *match) 422static 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
465static struct of_platform_driver rtc_driver = { 465static 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
480static int __devinit bq4802_probe(struct platform_device *op, const struct of_device_id *match) 480static 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
498static struct of_platform_driver bq4802_driver = { 498static 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
537static int __devinit mostek_probe(struct platform_device *op, const struct of_device_id *match) 537static 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
562static struct of_platform_driver mostek_driver = { 562static 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
622static int __devinit n2rng_probe(struct platform_device *op, 622static 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};
751MODULE_DEVICE_TABLE(of, n2rng_match); 753MODULE_DEVICE_TABLE(of, n2rng_match);
752 754
753static struct of_platform_driver n2rng_driver = { 755static 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
763static int __init n2rng_init(void) 765static 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
768static void __exit n2rng_exit(void) 770static void __exit n2rng_exit(void)
769{ 771{
770 of_unregister_platform_driver(&n2rng_driver); 772 platform_driver_unregister(&n2rng_driver);
771} 773}
772 774
773module_init(n2rng_init); 775module_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
2007static int __devinit n2_crypto_probe(struct platform_device *dev, 2007static 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
2119static int __devinit n2_mau_probe(struct platform_device *dev, 2118static 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
2212MODULE_DEVICE_TABLE(of, n2_crypto_match); 2210MODULE_DEVICE_TABLE(of, n2_crypto_match);
2213 2211
2214static struct of_platform_driver n2_crypto_driver = { 2212static 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
2236MODULE_DEVICE_TABLE(of, n2_mau_match); 2234MODULE_DEVICE_TABLE(of, n2_mau_match);
2237 2235
2238static struct of_platform_driver n2_mau_driver = { 2236static 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
2248static int __init n2_init(void) 2246static 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
2260static void __exit n2_exit(void) 2258static 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
2266module_init(n2_init); 2264module_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
237static int __devinit env_probe(struct platform_device *op, 237static 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};
300MODULE_DEVICE_TABLE(of, env_match); 299MODULE_DEVICE_TABLE(of, env_match);
301 300
302static struct of_platform_driver env_driver = { 301static 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
312static int __init env_init(void) 311static 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
317static void __exit env_exit(void) 316static void __exit env_exit(void)
318{ 317{
319 of_unregister_platform_driver(&env_driver); 318 platform_driver_unregister(&env_driver);
320} 319}
321 320
322module_init(env_init); 321module_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
176static int sparcspkr_shutdown(struct platform_device *dev) 176static 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
187static int __devinit bbc_beep_probe(struct platform_device *op, const struct of_device_id *match) 185static 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
261static struct of_platform_driver bbc_beep_driver = { 259static 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
272static int __devinit grover_beep_probe(struct platform_device *op, const struct of_device_id *match) 270static 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
343static struct of_platform_driver grover_beep_driver = { 341static 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
354static int __init sparcspkr_init(void) 352static 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
367static void __exit sparcspkr_exit(void) 365static 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
373module_init(sparcspkr_init); 371module_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
52static int __devinit sparc_i8042_probe(struct platform_device *op, const struct of_device_id *match) 52static 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};
96MODULE_DEVICE_TABLE(of, sparc_i8042_match); 96MODULE_DEVICE_TABLE(of, sparc_i8042_match);
97 97
98static struct of_platform_driver sparc_i8042_driver = { 98static 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
289static int __devinit bpp_probe(struct platform_device *op, const struct of_device_id *match) 289static 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
382MODULE_DEVICE_TABLE(of, bpp_match); 382MODULE_DEVICE_TABLE(of, bpp_match);
383 383
384static struct of_platform_driver bpp_sbus_driver = { 384static 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
394static int __init parport_sunbpp_init(void) 394static 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
399static void __exit parport_sunbpp_exit(void) 399static 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
404MODULE_AUTHOR("Derrick J Brashear"); 404MODULE_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:
361extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); 361extern int bbc_envctrl_init(struct bbc_i2c_bus *bp);
362extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); 362extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp);
363 363
364static int __devinit bbc_i2c_probe(struct platform_device *op, 364static 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};
414MODULE_DEVICE_TABLE(of, bbc_i2c_match); 413MODULE_DEVICE_TABLE(of, bbc_i2c_match);
415 414
416static struct of_platform_driver bbc_i2c_driver = { 415static 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
426static int __init bbc_i2c_init(void) 425static 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
431static void __exit bbc_i2c_exit(void) 430static 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
436module_init(bbc_i2c_init); 435module_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
174static int __devinit d7s_probe(struct platform_device *op, 174static 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};
267MODULE_DEVICE_TABLE(of, d7s_match); 266MODULE_DEVICE_TABLE(of, d7s_match);
268 267
269static struct of_platform_driver d7s_driver = { 268static 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
279static int __init d7s_init(void) 278static 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
284static void __exit d7s_exit(void) 283static void __exit d7s_exit(void)
285{ 284{
286 of_unregister_platform_driver(&d7s_driver); 285 platform_driver_unregister(&d7s_driver);
287} 286}
288 287
289module_init(d7s_init); 288module_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
1031static int __devinit envctrl_probe(struct platform_device *op, 1031static 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};
1130MODULE_DEVICE_TABLE(of, envctrl_match); 1129MODULE_DEVICE_TABLE(of, envctrl_match);
1131 1130
1132static struct of_platform_driver envctrl_driver = { 1131static 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
1142static int __init envctrl_init(void) 1141static 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
1147static void __exit envctrl_exit(void) 1146static void __exit envctrl_exit(void)
1148{ 1147{
1149 of_unregister_platform_driver(&envctrl_driver); 1148 platform_driver_unregister(&envctrl_driver);
1150} 1149}
1151 1150
1152module_init(envctrl_init); 1151module_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
161static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; 161static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops };
162 162
163static int __devinit flash_probe(struct platform_device *op, 163static 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};
208MODULE_DEVICE_TABLE(of, flash_match); 207MODULE_DEVICE_TABLE(of, flash_match);
209 208
210static struct of_platform_driver flash_driver = { 209static 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
220static int __init flash_init(void) 219static 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
225static void __exit flash_cleanup(void) 224static void __exit flash_cleanup(void)
226{ 225{
227 of_unregister_platform_driver(&flash_driver); 226 platform_driver_unregister(&flash_driver);
228} 227}
229 228
230module_init(flash_init); 229module_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
351static int __devinit uctrl_probe(struct platform_device *op, 351static 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};
426MODULE_DEVICE_TABLE(of, uctrl_match); 425MODULE_DEVICE_TABLE(of, uctrl_match);
427 426
428static struct of_platform_driver uctrl_driver = { 427static 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
439static int __init uctrl_init(void) 438static 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
444static void __exit uctrl_exit(void) 443static void __exit uctrl_exit(void)
445{ 444{
446 of_unregister_platform_driver(&uctrl_driver); 445 platform_driver_unregister(&uctrl_driver);
447} 446}
448 447
449module_init(uctrl_init); 448module_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
1295static int __devinit qpti_sbus_probe(struct platform_device *op, const struct of_device_id *match) 1295static 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};
1458MODULE_DEVICE_TABLE(of, qpti_match); 1462MODULE_DEVICE_TABLE(of, qpti_match);
1459 1463
1460static struct of_platform_driver qpti_sbus_driver = { 1464static 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
1470static int __init qpti_init(void) 1474static 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
1475static void __exit qpti_exit(void) 1479static 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
1480MODULE_DESCRIPTION("QlogicISP SBUS driver"); 1484MODULE_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
565static int __devinit esp_sbus_probe(struct platform_device *op, const struct of_device_id *match) 565static 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};
633MODULE_DEVICE_TABLE(of, esp_match); 633MODULE_DEVICE_TABLE(of, esp_match);
634 634
635static struct of_platform_driver esp_sbus_driver = { 635static 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
645static int __init sunesp_init(void) 645static 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
650static void __exit sunesp_exit(void) 650static 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
655MODULE_DESCRIPTION("Sun ESP SCSI driver"); 655MODULE_DESCRIPTION("Sun ESP SCSI driver");