aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-16 20:28:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-16 20:28:10 -0400
commit4c5811bf463b0ef82fabbd1708f8bb2d753aeb18 (patch)
treeff37d31217c3804ca05de21a55a9b5ca1ca818b2 /arch/sparc
parentf74b9444192c60603020c61d7915b72893137edc (diff)
parent9f15444fefdb33509132ff5c9be60cb315c44cb2 (diff)
Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits) tty: serial: altera_jtaguart: Add device tree support tty: serial: altera_uart: Add devicetree support dt: eliminate of_platform_driver shim code dt: Eliminate of_platform_{,un}register_driver dt/serial: Eliminate users of of_platform_{,un}register_driver dt/usb: Eliminate users of of_platform_{,un}register_driver dt/video: Eliminate users of of_platform_{,un}register_driver dt/net: Eliminate users of of_platform_{,un}register_driver dt/sound: Eliminate users of of_platform_{,un}register_driver dt/spi: Eliminate users of of_platform_{,un}register_driver dt: uartlite: merge platform and of_platform driver bindings dt: xilinx_hwicap: merge platform and of_platform driver bindings ipmi: convert OF driver to platform driver leds/leds-gpio: merge platform_driver with of_platform_driver dt/sparc: Eliminate users of of_platform_{,un}register_driver dt/powerpc: Eliminate users of of_platform_{,un}register_driver dt/powerpc: move of_bus_type infrastructure to ibmebus drivercore/dt: add a match table pointer to struct device dt: Typo fix. altera_ps2: Add devicetree support ...
Diffstat (limited to 'arch/sparc')
-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
14 files changed, 60 insertions, 71 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 4211bfc9bcad..19ab42a932db 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -137,7 +137,7 @@ static struct platform_device m48t59_rtc = {
137 }, 137 },
138}; 138};
139 139
140static int __devinit clock_probe(struct platform_device *op, const struct of_device_id *match) 140static int __devinit clock_probe(struct platform_device *op)
141{ 141{
142 struct device_node *dp = op->dev.of_node; 142 struct device_node *dp = op->dev.of_node;
143 const char *model = of_get_property(dp, "model", NULL); 143 const char *model = of_get_property(dp, "model", NULL);
@@ -171,7 +171,7 @@ static struct of_device_id __initdata clock_match[] = {
171 {}, 171 {},
172}; 172};
173 173
174static struct of_platform_driver clock_driver = { 174static struct platform_driver clock_driver = {
175 .probe = clock_probe, 175 .probe = clock_probe,
176 .driver = { 176 .driver = {
177 .name = "rtc", 177 .name = "rtc",
@@ -184,7 +184,7 @@ static struct of_platform_driver clock_driver = {
184/* Probe for the mostek real time clock chip. */ 184/* Probe for the mostek real time clock chip. */
185static int __init clock_init(void) 185static int __init clock_init(void)
186{ 186{
187 return of_register_platform_driver(&clock_driver); 187 return platform_driver_register(&clock_driver);
188} 188}
189/* Must be after subsys_initcall() so that busses are probed. Must 189/* Must be after subsys_initcall() so that busses are probed. Must
190 * be before device_initcall() because things like the RTC driver 190 * 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}