diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-02-22 22:01:33 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-02-28 03:36:39 -0500 |
commit | 4ebb24f707187196937607c60810d42f7112d7aa (patch) | |
tree | 89a92b3f8dd55f3c5e0cfa73fa6446b3d490f3a8 /arch/sparc/kernel | |
parent | 000061245a6797d542854106463b6b20fbdcb12e (diff) |
dt/sparc: Eliminate users of of_platform_{,un}register_driver
Get rid of old users of of_platform_driver in arch/sparc. Most
of_platform_driver users can be converted to use the platform_bus
directly.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/apc.c | 7 | ||||
-rw-r--r-- | arch/sparc/kernel/auxio_64.c | 7 | ||||
-rw-r--r-- | arch/sparc/kernel/central.c | 14 | ||||
-rw-r--r-- | arch/sparc/kernel/chmc.c | 19 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_fire.c | 7 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_psycho.c | 7 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_sabre.c | 9 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_schizo.c | 11 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_sun4v.c | 7 | ||||
-rw-r--r-- | arch/sparc/kernel/pmc.c | 7 | ||||
-rw-r--r-- | arch/sparc/kernel/power.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/time_32.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/time_64.c | 18 |
13 files changed, 57 insertions, 68 deletions
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 | } |