aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/of_platform.c7
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_gpio.c14
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_gpt.c10
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c11
-rw-r--r--arch/powerpc/platforms/82xx/ep8248e.c7
-rw-r--r--arch/powerpc/platforms/83xx/suspend.c14
-rw-r--r--arch/powerpc/platforms/cell/axon_msi.c11
-rw-r--r--arch/powerpc/platforms/pasemi/gpio_mdio.c9
-rw-r--r--arch/powerpc/sysdev/axonram.c11
-rw-r--r--arch/powerpc/sysdev/bestcomm/bestcomm.c9
-rw-r--r--arch/powerpc/sysdev/fsl_85xx_l2ctlr.c9
-rw-r--r--arch/powerpc/sysdev/fsl_msi.c13
-rw-r--r--arch/powerpc/sysdev/fsl_pmc.c7
-rw-r--r--arch/powerpc/sysdev/fsl_rio.c7
-rw-r--r--arch/powerpc/sysdev/pmi.c9
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe.c7
-rw-r--r--drivers/char/hw_random/pasemi-rng.c9
-rw-r--r--drivers/crypto/amcc/crypto4xx_core.c9
-rw-r--r--drivers/dma/fsldma.c14
-rw-r--r--drivers/dma/mpc512x_dma.c9
-rw-r--r--drivers/dma/ppc4xx/adma.c11
-rw-r--r--drivers/edac/mpc85xx_edac.c27
-rw-r--r--drivers/edac/ppc4xx_edac.c23
-rw-r--r--drivers/macintosh/smu.c7
-rw-r--r--drivers/macintosh/therm_pm72.c8
-rw-r--r--drivers/macintosh/therm_windtunnel.c9
26 files changed, 120 insertions, 161 deletions
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 9bd951c67767..24582181b6ec 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -36,8 +36,7 @@
36 * lacking some bits needed here. 36 * lacking some bits needed here.
37 */ 37 */
38 38
39static int __devinit of_pci_phb_probe(struct platform_device *dev, 39static int __devinit of_pci_phb_probe(struct platform_device *dev)
40 const struct of_device_id *match)
41{ 40{
42 struct pci_controller *phb; 41 struct pci_controller *phb;
43 42
@@ -104,7 +103,7 @@ static struct of_device_id of_pci_phb_ids[] = {
104 {} 103 {}
105}; 104};
106 105
107static struct of_platform_driver of_pci_phb_driver = { 106static struct platform_driver of_pci_phb_driver = {
108 .probe = of_pci_phb_probe, 107 .probe = of_pci_phb_probe,
109 .driver = { 108 .driver = {
110 .name = "of-pci", 109 .name = "of-pci",
@@ -115,7 +114,7 @@ static struct of_platform_driver of_pci_phb_driver = {
115 114
116static __init int of_pci_phb_init(void) 115static __init int of_pci_phb_init(void)
117{ 116{
118 return of_register_platform_driver(&of_pci_phb_driver); 117 return platform_driver_register(&of_pci_phb_driver);
119} 118}
120 119
121device_initcall(of_pci_phb_init); 120device_initcall(of_pci_phb_init);
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
index 0dad9a935eb5..1757d1db4b51 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
@@ -147,8 +147,7 @@ mpc52xx_wkup_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
147 return 0; 147 return 0;
148} 148}
149 149
150static int __devinit mpc52xx_wkup_gpiochip_probe(struct platform_device *ofdev, 150static int __devinit mpc52xx_wkup_gpiochip_probe(struct platform_device *ofdev)
151 const struct of_device_id *match)
152{ 151{
153 struct mpc52xx_gpiochip *chip; 152 struct mpc52xx_gpiochip *chip;
154 struct mpc52xx_gpio_wkup __iomem *regs; 153 struct mpc52xx_gpio_wkup __iomem *regs;
@@ -191,7 +190,7 @@ static const struct of_device_id mpc52xx_wkup_gpiochip_match[] = {
191 {} 190 {}
192}; 191};
193 192
194static struct of_platform_driver mpc52xx_wkup_gpiochip_driver = { 193static struct platform_driver mpc52xx_wkup_gpiochip_driver = {
195 .driver = { 194 .driver = {
196 .name = "gpio_wkup", 195 .name = "gpio_wkup",
197 .owner = THIS_MODULE, 196 .owner = THIS_MODULE,
@@ -310,8 +309,7 @@ mpc52xx_simple_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
310 return 0; 309 return 0;
311} 310}
312 311
313static int __devinit mpc52xx_simple_gpiochip_probe(struct platform_device *ofdev, 312static int __devinit mpc52xx_simple_gpiochip_probe(struct platform_device *ofdev)
314 const struct of_device_id *match)
315{ 313{
316 struct mpc52xx_gpiochip *chip; 314 struct mpc52xx_gpiochip *chip;
317 struct gpio_chip *gc; 315 struct gpio_chip *gc;
@@ -349,7 +347,7 @@ static const struct of_device_id mpc52xx_simple_gpiochip_match[] = {
349 {} 347 {}
350}; 348};
351 349
352static struct of_platform_driver mpc52xx_simple_gpiochip_driver = { 350static struct platform_driver mpc52xx_simple_gpiochip_driver = {
353 .driver = { 351 .driver = {
354 .name = "gpio", 352 .name = "gpio",
355 .owner = THIS_MODULE, 353 .owner = THIS_MODULE,
@@ -361,10 +359,10 @@ static struct of_platform_driver mpc52xx_simple_gpiochip_driver = {
361 359
362static int __init mpc52xx_gpio_init(void) 360static int __init mpc52xx_gpio_init(void)
363{ 361{
364 if (of_register_platform_driver(&mpc52xx_wkup_gpiochip_driver)) 362 if (platform_driver_register(&mpc52xx_wkup_gpiochip_driver))
365 printk(KERN_ERR "Unable to register wakeup GPIO driver\n"); 363 printk(KERN_ERR "Unable to register wakeup GPIO driver\n");
366 364
367 if (of_register_platform_driver(&mpc52xx_simple_gpiochip_driver)) 365 if (platform_driver_register(&mpc52xx_simple_gpiochip_driver))
368 printk(KERN_ERR "Unable to register simple GPIO driver\n"); 366 printk(KERN_ERR "Unable to register simple GPIO driver\n");
369 367
370 return 0; 368 return 0;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
index e0d703c7fdf7..859abf1c6d4b 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
@@ -721,8 +721,7 @@ static inline int mpc52xx_gpt_wdt_setup(struct mpc52xx_gpt_priv *gpt,
721/* --------------------------------------------------------------------- 721/* ---------------------------------------------------------------------
722 * of_platform bus binding code 722 * of_platform bus binding code
723 */ 723 */
724static int __devinit mpc52xx_gpt_probe(struct platform_device *ofdev, 724static int __devinit mpc52xx_gpt_probe(struct platform_device *ofdev)
725 const struct of_device_id *match)
726{ 725{
727 struct mpc52xx_gpt_priv *gpt; 726 struct mpc52xx_gpt_priv *gpt;
728 727
@@ -781,7 +780,7 @@ static const struct of_device_id mpc52xx_gpt_match[] = {
781 {} 780 {}
782}; 781};
783 782
784static struct of_platform_driver mpc52xx_gpt_driver = { 783static struct platform_driver mpc52xx_gpt_driver = {
785 .driver = { 784 .driver = {
786 .name = "mpc52xx-gpt", 785 .name = "mpc52xx-gpt",
787 .owner = THIS_MODULE, 786 .owner = THIS_MODULE,
@@ -793,10 +792,7 @@ static struct of_platform_driver mpc52xx_gpt_driver = {
793 792
794static int __init mpc52xx_gpt_init(void) 793static int __init mpc52xx_gpt_init(void)
795{ 794{
796 if (of_register_platform_driver(&mpc52xx_gpt_driver)) 795 return platform_driver_register(&mpc52xx_gpt_driver);
797 pr_err("error registering MPC52xx GPT driver\n");
798
799 return 0;
800} 796}
801 797
802/* Make sure GPIOs and IRQs get set up before anyone tries to use them */ 798/* Make sure GPIOs and IRQs get set up before anyone tries to use them */
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
index f4ac213c89c0..6385d883cb8d 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
@@ -436,8 +436,7 @@ void mpc52xx_lpbfifo_abort(struct mpc52xx_lpbfifo_request *req)
436} 436}
437EXPORT_SYMBOL(mpc52xx_lpbfifo_abort); 437EXPORT_SYMBOL(mpc52xx_lpbfifo_abort);
438 438
439static int __devinit mpc52xx_lpbfifo_probe(struct platform_device *op, 439static int __devinit mpc52xx_lpbfifo_probe(struct platform_device *op)
440 const struct of_device_id *match)
441{ 440{
442 struct resource res; 441 struct resource res;
443 int rc = -ENOMEM; 442 int rc = -ENOMEM;
@@ -536,7 +535,7 @@ static struct of_device_id mpc52xx_lpbfifo_match[] __devinitconst = {
536 {}, 535 {},
537}; 536};
538 537
539static struct of_platform_driver mpc52xx_lpbfifo_driver = { 538static struct platform_driver mpc52xx_lpbfifo_driver = {
540 .driver = { 539 .driver = {
541 .name = "mpc52xx-lpbfifo", 540 .name = "mpc52xx-lpbfifo",
542 .owner = THIS_MODULE, 541 .owner = THIS_MODULE,
@@ -551,14 +550,12 @@ static struct of_platform_driver mpc52xx_lpbfifo_driver = {
551 */ 550 */
552static int __init mpc52xx_lpbfifo_init(void) 551static int __init mpc52xx_lpbfifo_init(void)
553{ 552{
554 pr_debug("Registering LocalPlus bus FIFO driver\n"); 553 return platform_driver_register(&mpc52xx_lpbfifo_driver);
555 return of_register_platform_driver(&mpc52xx_lpbfifo_driver);
556} 554}
557module_init(mpc52xx_lpbfifo_init); 555module_init(mpc52xx_lpbfifo_init);
558 556
559static void __exit mpc52xx_lpbfifo_exit(void) 557static void __exit mpc52xx_lpbfifo_exit(void)
560{ 558{
561 pr_debug("Unregistering LocalPlus bus FIFO driver\n"); 559 platform_driver_unregister(&mpc52xx_lpbfifo_driver);
562 of_unregister_platform_driver(&mpc52xx_lpbfifo_driver);
563} 560}
564module_exit(mpc52xx_lpbfifo_exit); 561module_exit(mpc52xx_lpbfifo_exit);
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c
index 1565e0446dc8..10ff526cd046 100644
--- a/arch/powerpc/platforms/82xx/ep8248e.c
+++ b/arch/powerpc/platforms/82xx/ep8248e.c
@@ -111,8 +111,7 @@ static struct mdiobb_ctrl ep8248e_mdio_ctrl = {
111 .ops = &ep8248e_mdio_ops, 111 .ops = &ep8248e_mdio_ops,
112}; 112};
113 113
114static int __devinit ep8248e_mdio_probe(struct platform_device *ofdev, 114static int __devinit ep8248e_mdio_probe(struct platform_device *ofdev)
115 const struct of_device_id *match)
116{ 115{
117 struct mii_bus *bus; 116 struct mii_bus *bus;
118 struct resource res; 117 struct resource res;
@@ -167,7 +166,7 @@ static const struct of_device_id ep8248e_mdio_match[] = {
167 {}, 166 {},
168}; 167};
169 168
170static struct of_platform_driver ep8248e_mdio_driver = { 169static struct platform_driver ep8248e_mdio_driver = {
171 .driver = { 170 .driver = {
172 .name = "ep8248e-mdio-bitbang", 171 .name = "ep8248e-mdio-bitbang",
173 .owner = THIS_MODULE, 172 .owner = THIS_MODULE,
@@ -308,7 +307,7 @@ static __initdata struct of_device_id of_bus_ids[] = {
308static int __init declare_of_platform_devices(void) 307static int __init declare_of_platform_devices(void)
309{ 308{
310 of_platform_bus_probe(NULL, of_bus_ids, NULL); 309 of_platform_bus_probe(NULL, of_bus_ids, NULL);
311 of_register_platform_driver(&ep8248e_mdio_driver); 310 platform_driver_register(&ep8248e_mdio_driver);
312 311
313 return 0; 312 return 0;
314} 313}
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
index fd4f2f2f19e6..188272934cfb 100644
--- a/arch/powerpc/platforms/83xx/suspend.c
+++ b/arch/powerpc/platforms/83xx/suspend.c
@@ -318,14 +318,18 @@ static const struct platform_suspend_ops mpc83xx_suspend_ops = {
318 .end = mpc83xx_suspend_end, 318 .end = mpc83xx_suspend_end,
319}; 319};
320 320
321static int pmc_probe(struct platform_device *ofdev, 321static int pmc_probe(struct platform_device *ofdev)
322 const struct of_device_id *match)
323{ 322{
324 struct device_node *np = ofdev->dev.of_node; 323 struct device_node *np = ofdev->dev.of_node;
325 struct resource res; 324 struct resource res;
326 struct pmc_type *type = match->data; 325 struct pmc_type *type;
327 int ret = 0; 326 int ret = 0;
328 327
328 if (!ofdev->dev.of_match)
329 return -EINVAL;
330
331 type = ofdev->dev.of_match->data;
332
329 if (!of_device_is_available(np)) 333 if (!of_device_is_available(np))
330 return -ENODEV; 334 return -ENODEV;
331 335
@@ -422,7 +426,7 @@ static struct of_device_id pmc_match[] = {
422 {} 426 {}
423}; 427};
424 428
425static struct of_platform_driver pmc_driver = { 429static struct platform_driver pmc_driver = {
426 .driver = { 430 .driver = {
427 .name = "mpc83xx-pmc", 431 .name = "mpc83xx-pmc",
428 .owner = THIS_MODULE, 432 .owner = THIS_MODULE,
@@ -434,7 +438,7 @@ static struct of_platform_driver pmc_driver = {
434 438
435static int pmc_init(void) 439static int pmc_init(void)
436{ 440{
437 return of_register_platform_driver(&pmc_driver); 441 return platform_driver_register(&pmc_driver);
438} 442}
439 443
440module_init(pmc_init); 444module_init(pmc_init);
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
index e3e379c6caa7..c35099af340e 100644
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -328,7 +328,7 @@ static struct irq_host_ops msic_host_ops = {
328 .map = msic_host_map, 328 .map = msic_host_map,
329}; 329};
330 330
331static int axon_msi_shutdown(struct platform_device *device) 331static void axon_msi_shutdown(struct platform_device *device)
332{ 332{
333 struct axon_msic *msic = dev_get_drvdata(&device->dev); 333 struct axon_msic *msic = dev_get_drvdata(&device->dev);
334 u32 tmp; 334 u32 tmp;
@@ -338,12 +338,9 @@ static int axon_msi_shutdown(struct platform_device *device)
338 tmp = dcr_read(msic->dcr_host, MSIC_CTRL_REG); 338 tmp = dcr_read(msic->dcr_host, MSIC_CTRL_REG);
339 tmp &= ~MSIC_CTRL_ENABLE & ~MSIC_CTRL_IRQ_ENABLE; 339 tmp &= ~MSIC_CTRL_ENABLE & ~MSIC_CTRL_IRQ_ENABLE;
340 msic_dcr_write(msic, MSIC_CTRL_REG, tmp); 340 msic_dcr_write(msic, MSIC_CTRL_REG, tmp);
341
342 return 0;
343} 341}
344 342
345static int axon_msi_probe(struct platform_device *device, 343static int axon_msi_probe(struct platform_device *device)
346 const struct of_device_id *device_id)
347{ 344{
348 struct device_node *dn = device->dev.of_node; 345 struct device_node *dn = device->dev.of_node;
349 struct axon_msic *msic; 346 struct axon_msic *msic;
@@ -446,7 +443,7 @@ static const struct of_device_id axon_msi_device_id[] = {
446 {} 443 {}
447}; 444};
448 445
449static struct of_platform_driver axon_msi_driver = { 446static struct platform_driver axon_msi_driver = {
450 .probe = axon_msi_probe, 447 .probe = axon_msi_probe,
451 .shutdown = axon_msi_shutdown, 448 .shutdown = axon_msi_shutdown,
452 .driver = { 449 .driver = {
@@ -458,7 +455,7 @@ static struct of_platform_driver axon_msi_driver = {
458 455
459static int __init axon_msi_init(void) 456static int __init axon_msi_init(void)
460{ 457{
461 return of_register_platform_driver(&axon_msi_driver); 458 return platform_driver_register(&axon_msi_driver);
462} 459}
463subsys_initcall(axon_msi_init); 460subsys_initcall(axon_msi_init);
464 461
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c
index a5d907b5a4c2..9886296e08da 100644
--- a/arch/powerpc/platforms/pasemi/gpio_mdio.c
+++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c
@@ -216,8 +216,7 @@ static int gpio_mdio_reset(struct mii_bus *bus)
216} 216}
217 217
218 218
219static int __devinit gpio_mdio_probe(struct platform_device *ofdev, 219static int __devinit gpio_mdio_probe(struct platform_device *ofdev)
220 const struct of_device_id *match)
221{ 220{
222 struct device *dev = &ofdev->dev; 221 struct device *dev = &ofdev->dev;
223 struct device_node *np = ofdev->dev.of_node; 222 struct device_node *np = ofdev->dev.of_node;
@@ -299,7 +298,7 @@ static struct of_device_id gpio_mdio_match[] =
299}; 298};
300MODULE_DEVICE_TABLE(of, gpio_mdio_match); 299MODULE_DEVICE_TABLE(of, gpio_mdio_match);
301 300
302static struct of_platform_driver gpio_mdio_driver = 301static struct platform_driver gpio_mdio_driver =
303{ 302{
304 .probe = gpio_mdio_probe, 303 .probe = gpio_mdio_probe,
305 .remove = gpio_mdio_remove, 304 .remove = gpio_mdio_remove,
@@ -326,13 +325,13 @@ int gpio_mdio_init(void)
326 if (!gpio_regs) 325 if (!gpio_regs)
327 return -ENODEV; 326 return -ENODEV;
328 327
329 return of_register_platform_driver(&gpio_mdio_driver); 328 return platform_driver_register(&gpio_mdio_driver);
330} 329}
331module_init(gpio_mdio_init); 330module_init(gpio_mdio_init);
332 331
333void gpio_mdio_exit(void) 332void gpio_mdio_exit(void)
334{ 333{
335 of_unregister_platform_driver(&gpio_mdio_driver); 334 platform_driver_unregister(&gpio_mdio_driver);
336 if (gpio_regs) 335 if (gpio_regs)
337 iounmap(gpio_regs); 336 iounmap(gpio_regs);
338} 337}
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
index 2659a60bd7b8..27402c7d309d 100644
--- a/arch/powerpc/sysdev/axonram.c
+++ b/arch/powerpc/sysdev/axonram.c
@@ -172,10 +172,9 @@ static const struct block_device_operations axon_ram_devops = {
172 172
173/** 173/**
174 * axon_ram_probe - probe() method for platform driver 174 * axon_ram_probe - probe() method for platform driver
175 * @device, @device_id: see of_platform_driver method 175 * @device: see platform_driver method
176 */ 176 */
177static int axon_ram_probe(struct platform_device *device, 177static int axon_ram_probe(struct platform_device *device)
178 const struct of_device_id *device_id)
179{ 178{
180 static int axon_ram_bank_id = -1; 179 static int axon_ram_bank_id = -1;
181 struct axon_ram_bank *bank; 180 struct axon_ram_bank *bank;
@@ -326,7 +325,7 @@ static struct of_device_id axon_ram_device_id[] = {
326 {} 325 {}
327}; 326};
328 327
329static struct of_platform_driver axon_ram_driver = { 328static struct platform_driver axon_ram_driver = {
330 .probe = axon_ram_probe, 329 .probe = axon_ram_probe,
331 .remove = axon_ram_remove, 330 .remove = axon_ram_remove,
332 .driver = { 331 .driver = {
@@ -350,7 +349,7 @@ axon_ram_init(void)
350 } 349 }
351 azfs_minor = 0; 350 azfs_minor = 0;
352 351
353 return of_register_platform_driver(&axon_ram_driver); 352 return platform_driver_register(&axon_ram_driver);
354} 353}
355 354
356/** 355/**
@@ -359,7 +358,7 @@ axon_ram_init(void)
359static void __exit 358static void __exit
360axon_ram_exit(void) 359axon_ram_exit(void)
361{ 360{
362 of_unregister_platform_driver(&axon_ram_driver); 361 platform_driver_unregister(&axon_ram_driver);
363 unregister_blkdev(azfs_major, AXON_RAM_DEVICE_NAME); 362 unregister_blkdev(azfs_major, AXON_RAM_DEVICE_NAME);
364} 363}
365 364
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c
index 650256115064..b3fbb271be87 100644
--- a/arch/powerpc/sysdev/bestcomm/bestcomm.c
+++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c
@@ -365,8 +365,7 @@ bcom_engine_cleanup(void)
365/* OF platform driver */ 365/* OF platform driver */
366/* ======================================================================== */ 366/* ======================================================================== */
367 367
368static int __devinit mpc52xx_bcom_probe(struct platform_device *op, 368static int __devinit mpc52xx_bcom_probe(struct platform_device *op)
369 const struct of_device_id *match)
370{ 369{
371 struct device_node *ofn_sram; 370 struct device_node *ofn_sram;
372 struct resource res_bcom; 371 struct resource res_bcom;
@@ -492,7 +491,7 @@ static struct of_device_id mpc52xx_bcom_of_match[] = {
492MODULE_DEVICE_TABLE(of, mpc52xx_bcom_of_match); 491MODULE_DEVICE_TABLE(of, mpc52xx_bcom_of_match);
493 492
494 493
495static struct of_platform_driver mpc52xx_bcom_of_platform_driver = { 494static struct platform_driver mpc52xx_bcom_of_platform_driver = {
496 .probe = mpc52xx_bcom_probe, 495 .probe = mpc52xx_bcom_probe,
497 .remove = mpc52xx_bcom_remove, 496 .remove = mpc52xx_bcom_remove,
498 .driver = { 497 .driver = {
@@ -510,13 +509,13 @@ static struct of_platform_driver mpc52xx_bcom_of_platform_driver = {
510static int __init 509static int __init
511mpc52xx_bcom_init(void) 510mpc52xx_bcom_init(void)
512{ 511{
513 return of_register_platform_driver(&mpc52xx_bcom_of_platform_driver); 512 return platform_driver_register(&mpc52xx_bcom_of_platform_driver);
514} 513}
515 514
516static void __exit 515static void __exit
517mpc52xx_bcom_exit(void) 516mpc52xx_bcom_exit(void)
518{ 517{
519 of_unregister_platform_driver(&mpc52xx_bcom_of_platform_driver); 518 platform_driver_unregister(&mpc52xx_bcom_of_platform_driver);
520} 519}
521 520
522/* If we're not a module, we must make sure everything is setup before */ 521/* If we're not a module, we must make sure everything is setup before */
diff --git a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c
index cc8d6556d799..2b9f0c925326 100644
--- a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c
+++ b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c
@@ -71,8 +71,7 @@ static int __init get_offset_from_cmdline(char *str)
71__setup("cache-sram-size=", get_size_from_cmdline); 71__setup("cache-sram-size=", get_size_from_cmdline);
72__setup("cache-sram-offset=", get_offset_from_cmdline); 72__setup("cache-sram-offset=", get_offset_from_cmdline);
73 73
74static int __devinit mpc85xx_l2ctlr_of_probe(struct platform_device *dev, 74static int __devinit mpc85xx_l2ctlr_of_probe(struct platform_device *dev)
75 const struct of_device_id *match)
76{ 75{
77 long rval; 76 long rval;
78 unsigned int rem; 77 unsigned int rem;
@@ -204,7 +203,7 @@ static struct of_device_id mpc85xx_l2ctlr_of_match[] = {
204 {}, 203 {},
205}; 204};
206 205
207static struct of_platform_driver mpc85xx_l2ctlr_of_platform_driver = { 206static struct platform_driver mpc85xx_l2ctlr_of_platform_driver = {
208 .driver = { 207 .driver = {
209 .name = "fsl-l2ctlr", 208 .name = "fsl-l2ctlr",
210 .owner = THIS_MODULE, 209 .owner = THIS_MODULE,
@@ -216,12 +215,12 @@ static struct of_platform_driver mpc85xx_l2ctlr_of_platform_driver = {
216 215
217static __init int mpc85xx_l2ctlr_of_init(void) 216static __init int mpc85xx_l2ctlr_of_init(void)
218{ 217{
219 return of_register_platform_driver(&mpc85xx_l2ctlr_of_platform_driver); 218 return platform_driver_register(&mpc85xx_l2ctlr_of_platform_driver);
220} 219}
221 220
222static void __exit mpc85xx_l2ctlr_of_exit(void) 221static void __exit mpc85xx_l2ctlr_of_exit(void)
223{ 222{
224 of_unregister_platform_driver(&mpc85xx_l2ctlr_of_platform_driver); 223 platform_driver_unregister(&mpc85xx_l2ctlr_of_platform_driver);
225} 224}
226 225
227subsys_initcall(mpc85xx_l2ctlr_of_init); 226subsys_initcall(mpc85xx_l2ctlr_of_init);
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index 108d76fa8f1c..ee6a8a52ac71 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -273,8 +273,7 @@ static int fsl_of_msi_remove(struct platform_device *ofdev)
273 return 0; 273 return 0;
274} 274}
275 275
276static int __devinit fsl_of_msi_probe(struct platform_device *dev, 276static int __devinit fsl_of_msi_probe(struct platform_device *dev)
277 const struct of_device_id *match)
278{ 277{
279 struct fsl_msi *msi; 278 struct fsl_msi *msi;
280 struct resource res; 279 struct resource res;
@@ -282,11 +281,15 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev,
282 int rc; 281 int rc;
283 int virt_msir; 282 int virt_msir;
284 const u32 *p; 283 const u32 *p;
285 struct fsl_msi_feature *features = match->data; 284 struct fsl_msi_feature *features;
286 struct fsl_msi_cascade_data *cascade_data = NULL; 285 struct fsl_msi_cascade_data *cascade_data = NULL;
287 int len; 286 int len;
288 u32 offset; 287 u32 offset;
289 288
289 if (!dev->dev.of_match)
290 return -EINVAL;
291 features = dev->dev.of_match->data;
292
290 printk(KERN_DEBUG "Setting up Freescale MSI support\n"); 293 printk(KERN_DEBUG "Setting up Freescale MSI support\n");
291 294
292 msi = kzalloc(sizeof(struct fsl_msi), GFP_KERNEL); 295 msi = kzalloc(sizeof(struct fsl_msi), GFP_KERNEL);
@@ -411,7 +414,7 @@ static const struct of_device_id fsl_of_msi_ids[] = {
411 {} 414 {}
412}; 415};
413 416
414static struct of_platform_driver fsl_of_msi_driver = { 417static struct platform_driver fsl_of_msi_driver = {
415 .driver = { 418 .driver = {
416 .name = "fsl-msi", 419 .name = "fsl-msi",
417 .owner = THIS_MODULE, 420 .owner = THIS_MODULE,
@@ -423,7 +426,7 @@ static struct of_platform_driver fsl_of_msi_driver = {
423 426
424static __init int fsl_of_msi_init(void) 427static __init int fsl_of_msi_init(void)
425{ 428{
426 return of_register_platform_driver(&fsl_of_msi_driver); 429 return platform_driver_register(&fsl_of_msi_driver);
427} 430}
428 431
429subsys_initcall(fsl_of_msi_init); 432subsys_initcall(fsl_of_msi_init);
diff --git a/arch/powerpc/sysdev/fsl_pmc.c b/arch/powerpc/sysdev/fsl_pmc.c
index e9381bfefb21..f122e8961d32 100644
--- a/arch/powerpc/sysdev/fsl_pmc.c
+++ b/arch/powerpc/sysdev/fsl_pmc.c
@@ -58,8 +58,7 @@ static const struct platform_suspend_ops pmc_suspend_ops = {
58 .enter = pmc_suspend_enter, 58 .enter = pmc_suspend_enter,
59}; 59};
60 60
61static int pmc_probe(struct platform_device *ofdev, 61static int pmc_probe(struct platform_device *ofdev)
62 const struct of_device_id *id)
63{ 62{
64 pmc_regs = of_iomap(ofdev->dev.of_node, 0); 63 pmc_regs = of_iomap(ofdev->dev.of_node, 0);
65 if (!pmc_regs) 64 if (!pmc_regs)
@@ -76,7 +75,7 @@ static const struct of_device_id pmc_ids[] = {
76 { }, 75 { },
77}; 76};
78 77
79static struct of_platform_driver pmc_driver = { 78static struct platform_driver pmc_driver = {
80 .driver = { 79 .driver = {
81 .name = "fsl-pmc", 80 .name = "fsl-pmc",
82 .owner = THIS_MODULE, 81 .owner = THIS_MODULE,
@@ -87,6 +86,6 @@ static struct of_platform_driver pmc_driver = {
87 86
88static int __init pmc_init(void) 87static int __init pmc_init(void)
89{ 88{
90 return of_register_platform_driver(&pmc_driver); 89 return platform_driver_register(&pmc_driver);
91} 90}
92device_initcall(pmc_init); 91device_initcall(pmc_init);
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 8c6cab013278..3eff2c3a9ad5 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -1570,8 +1570,7 @@ err_ops:
1570 1570
1571/* The probe function for RapidIO peer-to-peer network. 1571/* The probe function for RapidIO peer-to-peer network.
1572 */ 1572 */
1573static int __devinit fsl_of_rio_rpn_probe(struct platform_device *dev, 1573static int __devinit fsl_of_rio_rpn_probe(struct platform_device *dev)
1574 const struct of_device_id *match)
1575{ 1574{
1576 int rc; 1575 int rc;
1577 printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n", 1576 printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n",
@@ -1594,7 +1593,7 @@ static const struct of_device_id fsl_of_rio_rpn_ids[] = {
1594 {}, 1593 {},
1595}; 1594};
1596 1595
1597static struct of_platform_driver fsl_of_rio_rpn_driver = { 1596static struct platform_driver fsl_of_rio_rpn_driver = {
1598 .driver = { 1597 .driver = {
1599 .name = "fsl-of-rio", 1598 .name = "fsl-of-rio",
1600 .owner = THIS_MODULE, 1599 .owner = THIS_MODULE,
@@ -1605,7 +1604,7 @@ static struct of_platform_driver fsl_of_rio_rpn_driver = {
1605 1604
1606static __init int fsl_of_rio_rpn_init(void) 1605static __init int fsl_of_rio_rpn_init(void)
1607{ 1606{
1608 return of_register_platform_driver(&fsl_of_rio_rpn_driver); 1607 return platform_driver_register(&fsl_of_rio_rpn_driver);
1609} 1608}
1610 1609
1611subsys_initcall(fsl_of_rio_rpn_init); 1610subsys_initcall(fsl_of_rio_rpn_init);
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c
index 4260f368db52..8ce4fc3d9828 100644
--- a/arch/powerpc/sysdev/pmi.c
+++ b/arch/powerpc/sysdev/pmi.c
@@ -121,8 +121,7 @@ static void pmi_notify_handlers(struct work_struct *work)
121 spin_unlock(&data->handler_spinlock); 121 spin_unlock(&data->handler_spinlock);
122} 122}
123 123
124static int pmi_of_probe(struct platform_device *dev, 124static int pmi_of_probe(struct platform_device *dev)
125 const struct of_device_id *match)
126{ 125{
127 struct device_node *np = dev->dev.of_node; 126 struct device_node *np = dev->dev.of_node;
128 int rc; 127 int rc;
@@ -205,7 +204,7 @@ static int pmi_of_remove(struct platform_device *dev)
205 return 0; 204 return 0;
206} 205}
207 206
208static struct of_platform_driver pmi_of_platform_driver = { 207static struct platform_driver pmi_of_platform_driver = {
209 .probe = pmi_of_probe, 208 .probe = pmi_of_probe,
210 .remove = pmi_of_remove, 209 .remove = pmi_of_remove,
211 .driver = { 210 .driver = {
@@ -217,13 +216,13 @@ static struct of_platform_driver pmi_of_platform_driver = {
217 216
218static int __init pmi_module_init(void) 217static int __init pmi_module_init(void)
219{ 218{
220 return of_register_platform_driver(&pmi_of_platform_driver); 219 return platform_driver_register(&pmi_of_platform_driver);
221} 220}
222module_init(pmi_module_init); 221module_init(pmi_module_init);
223 222
224static void __exit pmi_module_exit(void) 223static void __exit pmi_module_exit(void)
225{ 224{
226 of_unregister_platform_driver(&pmi_of_platform_driver); 225 platform_driver_unregister(&pmi_of_platform_driver);
227} 226}
228module_exit(pmi_module_exit); 227module_exit(pmi_module_exit);
229 228
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 90020de4dcf2..904c6cbaf45b 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -659,8 +659,7 @@ static int qe_resume(struct platform_device *ofdev)
659 return 0; 659 return 0;
660} 660}
661 661
662static int qe_probe(struct platform_device *ofdev, 662static int qe_probe(struct platform_device *ofdev)
663 const struct of_device_id *id)
664{ 663{
665 return 0; 664 return 0;
666} 665}
@@ -670,7 +669,7 @@ static const struct of_device_id qe_ids[] = {
670 { }, 669 { },
671}; 670};
672 671
673static struct of_platform_driver qe_driver = { 672static struct platform_driver qe_driver = {
674 .driver = { 673 .driver = {
675 .name = "fsl-qe", 674 .name = "fsl-qe",
676 .owner = THIS_MODULE, 675 .owner = THIS_MODULE,
@@ -682,7 +681,7 @@ static struct of_platform_driver qe_driver = {
682 681
683static int __init qe_drv_init(void) 682static int __init qe_drv_init(void)
684{ 683{
685 return of_register_platform_driver(&qe_driver); 684 return platform_driver_register(&qe_driver);
686} 685}
687device_initcall(qe_drv_init); 686device_initcall(qe_drv_init);
688#endif /* defined(CONFIG_SUSPEND) && defined(CONFIG_PPC_85xx) */ 687#endif /* defined(CONFIG_SUSPEND) && defined(CONFIG_PPC_85xx) */
diff --git a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c
index a31c830ca8cd..1d504815e6db 100644
--- a/drivers/char/hw_random/pasemi-rng.c
+++ b/drivers/char/hw_random/pasemi-rng.c
@@ -94,8 +94,7 @@ static struct hwrng pasemi_rng = {
94 .data_read = pasemi_rng_data_read, 94 .data_read = pasemi_rng_data_read,
95}; 95};
96 96
97static int __devinit rng_probe(struct platform_device *ofdev, 97static int __devinit rng_probe(struct platform_device *ofdev)
98 const struct of_device_id *match)
99{ 98{
100 void __iomem *rng_regs; 99 void __iomem *rng_regs;
101 struct device_node *rng_np = ofdev->dev.of_node; 100 struct device_node *rng_np = ofdev->dev.of_node;
@@ -139,7 +138,7 @@ static struct of_device_id rng_match[] = {
139 { }, 138 { },
140}; 139};
141 140
142static struct of_platform_driver rng_driver = { 141static struct platform_driver rng_driver = {
143 .driver = { 142 .driver = {
144 .name = "pasemi-rng", 143 .name = "pasemi-rng",
145 .owner = THIS_MODULE, 144 .owner = THIS_MODULE,
@@ -151,13 +150,13 @@ static struct of_platform_driver rng_driver = {
151 150
152static int __init rng_init(void) 151static int __init rng_init(void)
153{ 152{
154 return of_register_platform_driver(&rng_driver); 153 return platform_driver_register(&rng_driver);
155} 154}
156module_init(rng_init); 155module_init(rng_init);
157 156
158static void __exit rng_exit(void) 157static void __exit rng_exit(void)
159{ 158{
160 of_unregister_platform_driver(&rng_driver); 159 platform_driver_unregister(&rng_driver);
161} 160}
162module_exit(rng_exit); 161module_exit(rng_exit);
163 162
diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c
index 2b1baee525bc..18912521a7a5 100644
--- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -1150,8 +1150,7 @@ struct crypto4xx_alg_common crypto4xx_alg[] = {
1150/** 1150/**
1151 * Module Initialization Routine 1151 * Module Initialization Routine
1152 */ 1152 */
1153static int __init crypto4xx_probe(struct platform_device *ofdev, 1153static int __init crypto4xx_probe(struct platform_device *ofdev)
1154 const struct of_device_id *match)
1155{ 1154{
1156 int rc; 1155 int rc;
1157 struct resource res; 1156 struct resource res;
@@ -1280,7 +1279,7 @@ static const struct of_device_id crypto4xx_match[] = {
1280 { }, 1279 { },
1281}; 1280};
1282 1281
1283static struct of_platform_driver crypto4xx_driver = { 1282static struct platform_driver crypto4xx_driver = {
1284 .driver = { 1283 .driver = {
1285 .name = "crypto4xx", 1284 .name = "crypto4xx",
1286 .owner = THIS_MODULE, 1285 .owner = THIS_MODULE,
@@ -1292,12 +1291,12 @@ static struct of_platform_driver crypto4xx_driver = {
1292 1291
1293static int __init crypto4xx_init(void) 1292static int __init crypto4xx_init(void)
1294{ 1293{
1295 return of_register_platform_driver(&crypto4xx_driver); 1294 return platform_driver_register(&crypto4xx_driver);
1296} 1295}
1297 1296
1298static void __exit crypto4xx_exit(void) 1297static void __exit crypto4xx_exit(void)
1299{ 1298{
1300 of_unregister_platform_driver(&crypto4xx_driver); 1299 platform_driver_unregister(&crypto4xx_driver);
1301} 1300}
1302 1301
1303module_init(crypto4xx_init); 1302module_init(crypto4xx_init);
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 4de947a450fc..e3854a8f0de0 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -1281,8 +1281,7 @@ static void fsl_dma_chan_remove(struct fsldma_chan *chan)
1281 kfree(chan); 1281 kfree(chan);
1282} 1282}
1283 1283
1284static int __devinit fsldma_of_probe(struct platform_device *op, 1284static int __devinit fsldma_of_probe(struct platform_device *op)
1285 const struct of_device_id *match)
1286{ 1285{
1287 struct fsldma_device *fdev; 1286 struct fsldma_device *fdev;
1288 struct device_node *child; 1287 struct device_node *child;
@@ -1414,20 +1413,13 @@ static struct of_platform_driver fsldma_of_driver = {
1414 1413
1415static __init int fsldma_init(void) 1414static __init int fsldma_init(void)
1416{ 1415{
1417 int ret;
1418
1419 pr_info("Freescale Elo / Elo Plus DMA driver\n"); 1416 pr_info("Freescale Elo / Elo Plus DMA driver\n");
1420 1417 return platform_driver_register(&fsldma_of_driver);
1421 ret = of_register_platform_driver(&fsldma_of_driver);
1422 if (ret)
1423 pr_err("fsldma: failed to register platform driver\n");
1424
1425 return ret;
1426} 1418}
1427 1419
1428static void __exit fsldma_exit(void) 1420static void __exit fsldma_exit(void)
1429{ 1421{
1430 of_unregister_platform_driver(&fsldma_of_driver); 1422 platform_driver_unregister(&fsldma_of_driver);
1431} 1423}
1432 1424
1433subsys_initcall(fsldma_init); 1425subsys_initcall(fsldma_init);
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c
index 59c270192ccc..4f95d31f5a20 100644
--- a/drivers/dma/mpc512x_dma.c
+++ b/drivers/dma/mpc512x_dma.c
@@ -649,8 +649,7 @@ mpc_dma_prep_memcpy(struct dma_chan *chan, dma_addr_t dst, dma_addr_t src,
649 return &mdesc->desc; 649 return &mdesc->desc;
650} 650}
651 651
652static int __devinit mpc_dma_probe(struct platform_device *op, 652static int __devinit mpc_dma_probe(struct platform_device *op)
653 const struct of_device_id *match)
654{ 653{
655 struct device_node *dn = op->dev.of_node; 654 struct device_node *dn = op->dev.of_node;
656 struct device *dev = &op->dev; 655 struct device *dev = &op->dev;
@@ -827,7 +826,7 @@ static struct of_device_id mpc_dma_match[] = {
827 {}, 826 {},
828}; 827};
829 828
830static struct of_platform_driver mpc_dma_driver = { 829static struct platform_driver mpc_dma_driver = {
831 .probe = mpc_dma_probe, 830 .probe = mpc_dma_probe,
832 .remove = __devexit_p(mpc_dma_remove), 831 .remove = __devexit_p(mpc_dma_remove),
833 .driver = { 832 .driver = {
@@ -839,13 +838,13 @@ static struct of_platform_driver mpc_dma_driver = {
839 838
840static int __init mpc_dma_init(void) 839static int __init mpc_dma_init(void)
841{ 840{
842 return of_register_platform_driver(&mpc_dma_driver); 841 return platform_driver_register(&mpc_dma_driver);
843} 842}
844module_init(mpc_dma_init); 843module_init(mpc_dma_init);
845 844
846static void __exit mpc_dma_exit(void) 845static void __exit mpc_dma_exit(void)
847{ 846{
848 of_unregister_platform_driver(&mpc_dma_driver); 847 platform_driver_unregister(&mpc_dma_driver);
849} 848}
850module_exit(mpc_dma_exit); 849module_exit(mpc_dma_exit);
851 850
diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
index cef584533ee8..3b0247e74cc4 100644
--- a/drivers/dma/ppc4xx/adma.c
+++ b/drivers/dma/ppc4xx/adma.c
@@ -4393,8 +4393,7 @@ static void ppc440spe_adma_release_irqs(struct ppc440spe_adma_device *adev,
4393/** 4393/**
4394 * ppc440spe_adma_probe - probe the asynch device 4394 * ppc440spe_adma_probe - probe the asynch device
4395 */ 4395 */
4396static int __devinit ppc440spe_adma_probe(struct platform_device *ofdev, 4396static int __devinit ppc440spe_adma_probe(struct platform_device *ofdev)
4397 const struct of_device_id *match)
4398{ 4397{
4399 struct device_node *np = ofdev->dev.of_node; 4398 struct device_node *np = ofdev->dev.of_node;
4400 struct resource res; 4399 struct resource res;
@@ -4944,7 +4943,7 @@ static const struct of_device_id ppc440spe_adma_of_match[] __devinitconst = {
4944}; 4943};
4945MODULE_DEVICE_TABLE(of, ppc440spe_adma_of_match); 4944MODULE_DEVICE_TABLE(of, ppc440spe_adma_of_match);
4946 4945
4947static struct of_platform_driver ppc440spe_adma_driver = { 4946static struct platform_driver ppc440spe_adma_driver = {
4948 .probe = ppc440spe_adma_probe, 4947 .probe = ppc440spe_adma_probe,
4949 .remove = __devexit_p(ppc440spe_adma_remove), 4948 .remove = __devexit_p(ppc440spe_adma_remove),
4950 .driver = { 4949 .driver = {
@@ -4962,7 +4961,7 @@ static __init int ppc440spe_adma_init(void)
4962 if (ret) 4961 if (ret)
4963 return ret; 4962 return ret;
4964 4963
4965 ret = of_register_platform_driver(&ppc440spe_adma_driver); 4964 ret = platform_driver_register(&ppc440spe_adma_driver);
4966 if (ret) { 4965 if (ret) {
4967 pr_err("%s: failed to register platform driver\n", 4966 pr_err("%s: failed to register platform driver\n",
4968 __func__); 4967 __func__);
@@ -4996,7 +4995,7 @@ out_dev:
4996 /* User will not be able to enable h/w RAID-6 */ 4995 /* User will not be able to enable h/w RAID-6 */
4997 pr_err("%s: failed to create RAID-6 driver interface\n", 4996 pr_err("%s: failed to create RAID-6 driver interface\n",
4998 __func__); 4997 __func__);
4999 of_unregister_platform_driver(&ppc440spe_adma_driver); 4998 platform_driver_unregister(&ppc440spe_adma_driver);
5000out_reg: 4999out_reg:
5001 dcr_unmap(ppc440spe_mq_dcr_host, ppc440spe_mq_dcr_len); 5000 dcr_unmap(ppc440spe_mq_dcr_host, ppc440spe_mq_dcr_len);
5002 kfree(ppc440spe_dma_fifo_buf); 5001 kfree(ppc440spe_dma_fifo_buf);
@@ -5011,7 +5010,7 @@ static void __exit ppc440spe_adma_exit(void)
5011 &driver_attr_enable); 5010 &driver_attr_enable);
5012 driver_remove_file(&ppc440spe_adma_driver.driver, 5011 driver_remove_file(&ppc440spe_adma_driver.driver,
5013 &driver_attr_devices); 5012 &driver_attr_devices);
5014 of_unregister_platform_driver(&ppc440spe_adma_driver); 5013 platform_driver_unregister(&ppc440spe_adma_driver);
5015 dcr_unmap(ppc440spe_mq_dcr_host, ppc440spe_mq_dcr_len); 5014 dcr_unmap(ppc440spe_mq_dcr_host, ppc440spe_mq_dcr_len);
5016 kfree(ppc440spe_dma_fifo_buf); 5015 kfree(ppc440spe_dma_fifo_buf);
5017} 5016}
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index b123bb308a4a..ffb5ad080bee 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -200,8 +200,7 @@ static irqreturn_t mpc85xx_pci_isr(int irq, void *dev_id)
200 return IRQ_HANDLED; 200 return IRQ_HANDLED;
201} 201}
202 202
203static int __devinit mpc85xx_pci_err_probe(struct platform_device *op, 203static int __devinit mpc85xx_pci_err_probe(struct platform_device *op)
204 const struct of_device_id *match)
205{ 204{
206 struct edac_pci_ctl_info *pci; 205 struct edac_pci_ctl_info *pci;
207 struct mpc85xx_pci_pdata *pdata; 206 struct mpc85xx_pci_pdata *pdata;
@@ -338,7 +337,7 @@ static struct of_device_id mpc85xx_pci_err_of_match[] = {
338}; 337};
339MODULE_DEVICE_TABLE(of, mpc85xx_pci_err_of_match); 338MODULE_DEVICE_TABLE(of, mpc85xx_pci_err_of_match);
340 339
341static struct of_platform_driver mpc85xx_pci_err_driver = { 340static struct platform_driver mpc85xx_pci_err_driver = {
342 .probe = mpc85xx_pci_err_probe, 341 .probe = mpc85xx_pci_err_probe,
343 .remove = __devexit_p(mpc85xx_pci_err_remove), 342 .remove = __devexit_p(mpc85xx_pci_err_remove),
344 .driver = { 343 .driver = {
@@ -503,8 +502,7 @@ static irqreturn_t mpc85xx_l2_isr(int irq, void *dev_id)
503 return IRQ_HANDLED; 502 return IRQ_HANDLED;
504} 503}
505 504
506static int __devinit mpc85xx_l2_err_probe(struct platform_device *op, 505static int __devinit mpc85xx_l2_err_probe(struct platform_device *op)
507 const struct of_device_id *match)
508{ 506{
509 struct edac_device_ctl_info *edac_dev; 507 struct edac_device_ctl_info *edac_dev;
510 struct mpc85xx_l2_pdata *pdata; 508 struct mpc85xx_l2_pdata *pdata;
@@ -656,7 +654,7 @@ static struct of_device_id mpc85xx_l2_err_of_match[] = {
656}; 654};
657MODULE_DEVICE_TABLE(of, mpc85xx_l2_err_of_match); 655MODULE_DEVICE_TABLE(of, mpc85xx_l2_err_of_match);
658 656
659static struct of_platform_driver mpc85xx_l2_err_driver = { 657static struct platform_driver mpc85xx_l2_err_driver = {
660 .probe = mpc85xx_l2_err_probe, 658 .probe = mpc85xx_l2_err_probe,
661 .remove = mpc85xx_l2_err_remove, 659 .remove = mpc85xx_l2_err_remove,
662 .driver = { 660 .driver = {
@@ -956,8 +954,7 @@ static void __devinit mpc85xx_init_csrows(struct mem_ctl_info *mci)
956 } 954 }
957} 955}
958 956
959static int __devinit mpc85xx_mc_err_probe(struct platform_device *op, 957static int __devinit mpc85xx_mc_err_probe(struct platform_device *op)
960 const struct of_device_id *match)
961{ 958{
962 struct mem_ctl_info *mci; 959 struct mem_ctl_info *mci;
963 struct mpc85xx_mc_pdata *pdata; 960 struct mpc85xx_mc_pdata *pdata;
@@ -1136,7 +1133,7 @@ static struct of_device_id mpc85xx_mc_err_of_match[] = {
1136}; 1133};
1137MODULE_DEVICE_TABLE(of, mpc85xx_mc_err_of_match); 1134MODULE_DEVICE_TABLE(of, mpc85xx_mc_err_of_match);
1138 1135
1139static struct of_platform_driver mpc85xx_mc_err_driver = { 1136static struct platform_driver mpc85xx_mc_err_driver = {
1140 .probe = mpc85xx_mc_err_probe, 1137 .probe = mpc85xx_mc_err_probe,
1141 .remove = mpc85xx_mc_err_remove, 1138 .remove = mpc85xx_mc_err_remove,
1142 .driver = { 1139 .driver = {
@@ -1171,16 +1168,16 @@ static int __init mpc85xx_mc_init(void)
1171 break; 1168 break;
1172 } 1169 }
1173 1170
1174 res = of_register_platform_driver(&mpc85xx_mc_err_driver); 1171 res = platform_driver_register(&mpc85xx_mc_err_driver);
1175 if (res) 1172 if (res)
1176 printk(KERN_WARNING EDAC_MOD_STR "MC fails to register\n"); 1173 printk(KERN_WARNING EDAC_MOD_STR "MC fails to register\n");
1177 1174
1178 res = of_register_platform_driver(&mpc85xx_l2_err_driver); 1175 res = platform_driver_register(&mpc85xx_l2_err_driver);
1179 if (res) 1176 if (res)
1180 printk(KERN_WARNING EDAC_MOD_STR "L2 fails to register\n"); 1177 printk(KERN_WARNING EDAC_MOD_STR "L2 fails to register\n");
1181 1178
1182#ifdef CONFIG_PCI 1179#ifdef CONFIG_PCI
1183 res = of_register_platform_driver(&mpc85xx_pci_err_driver); 1180 res = platform_driver_register(&mpc85xx_pci_err_driver);
1184 if (res) 1181 if (res)
1185 printk(KERN_WARNING EDAC_MOD_STR "PCI fails to register\n"); 1182 printk(KERN_WARNING EDAC_MOD_STR "PCI fails to register\n");
1186#endif 1183#endif
@@ -1212,10 +1209,10 @@ static void __exit mpc85xx_mc_exit(void)
1212 on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0); 1209 on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0);
1213#endif 1210#endif
1214#ifdef CONFIG_PCI 1211#ifdef CONFIG_PCI
1215 of_unregister_platform_driver(&mpc85xx_pci_err_driver); 1212 platform_driver_unregister(&mpc85xx_pci_err_driver);
1216#endif 1213#endif
1217 of_unregister_platform_driver(&mpc85xx_l2_err_driver); 1214 platform_driver_unregister(&mpc85xx_l2_err_driver);
1218 of_unregister_platform_driver(&mpc85xx_mc_err_driver); 1215 platform_driver_unregister(&mpc85xx_mc_err_driver);
1219} 1216}
1220 1217
1221module_exit(mpc85xx_mc_exit); 1218module_exit(mpc85xx_mc_exit);
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
index b9f0c20df1aa..c1f0045ceb8e 100644
--- a/drivers/edac/ppc4xx_edac.c
+++ b/drivers/edac/ppc4xx_edac.c
@@ -184,8 +184,7 @@ struct ppc4xx_ecc_status {
184 184
185/* Function Prototypes */ 185/* Function Prototypes */
186 186
187static int ppc4xx_edac_probe(struct platform_device *device, 187static int ppc4xx_edac_probe(struct platform_device *device)
188 const struct of_device_id *device_id);
189static int ppc4xx_edac_remove(struct platform_device *device); 188static int ppc4xx_edac_remove(struct platform_device *device);
190 189
191/* Global Variables */ 190/* Global Variables */
@@ -201,7 +200,7 @@ static struct of_device_id ppc4xx_edac_match[] = {
201 { } 200 { }
202}; 201};
203 202
204static struct of_platform_driver ppc4xx_edac_driver = { 203static struct platform_driver ppc4xx_edac_driver = {
205 .probe = ppc4xx_edac_probe, 204 .probe = ppc4xx_edac_probe,
206 .remove = ppc4xx_edac_remove, 205 .remove = ppc4xx_edac_remove,
207 .driver = { 206 .driver = {
@@ -997,9 +996,6 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
997 * initialized. 996 * initialized.
998 * @op: A pointer to the OpenFirmware device tree node associated 997 * @op: A pointer to the OpenFirmware device tree node associated
999 * with the controller this EDAC instance is bound to. 998 * with the controller this EDAC instance is bound to.
1000 * @match: A pointer to the OpenFirmware device tree match
1001 * information associated with the controller this EDAC instance
1002 * is bound to.
1003 * @dcr_host: A pointer to the DCR data containing the DCR mapping 999 * @dcr_host: A pointer to the DCR data containing the DCR mapping
1004 * for this controller instance. 1000 * for this controller instance.
1005 * @mcopt1: The 32-bit Memory Controller Option 1 register value 1001 * @mcopt1: The 32-bit Memory Controller Option 1 register value
@@ -1015,7 +1011,6 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
1015static int __devinit 1011static int __devinit
1016ppc4xx_edac_mc_init(struct mem_ctl_info *mci, 1012ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
1017 struct platform_device *op, 1013 struct platform_device *op,
1018 const struct of_device_id *match,
1019 const dcr_host_t *dcr_host, 1014 const dcr_host_t *dcr_host,
1020 u32 mcopt1) 1015 u32 mcopt1)
1021{ 1016{
@@ -1024,7 +1019,7 @@ ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
1024 struct ppc4xx_edac_pdata *pdata = NULL; 1019 struct ppc4xx_edac_pdata *pdata = NULL;
1025 const struct device_node *np = op->dev.of_node; 1020 const struct device_node *np = op->dev.of_node;
1026 1021
1027 if (match == NULL) 1022 if (op->dev.of_match == NULL)
1028 return -EINVAL; 1023 return -EINVAL;
1029 1024
1030 /* Initial driver pointers and private data */ 1025 /* Initial driver pointers and private data */
@@ -1227,9 +1222,6 @@ ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host)
1227 * ppc4xx_edac_probe - check controller and bind driver 1222 * ppc4xx_edac_probe - check controller and bind driver
1228 * @op: A pointer to the OpenFirmware device tree node associated 1223 * @op: A pointer to the OpenFirmware device tree node associated
1229 * with the controller being probed for driver binding. 1224 * with the controller being probed for driver binding.
1230 * @match: A pointer to the OpenFirmware device tree match
1231 * information associated with the controller being probed
1232 * for driver binding.
1233 * 1225 *
1234 * This routine probes a specific ibm,sdram-4xx-ddr2 controller 1226 * This routine probes a specific ibm,sdram-4xx-ddr2 controller
1235 * instance for binding with the driver. 1227 * instance for binding with the driver.
@@ -1237,8 +1229,7 @@ ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host)
1237 * Returns 0 if the controller instance was successfully bound to the 1229 * Returns 0 if the controller instance was successfully bound to the
1238 * driver; otherwise, < 0 on error. 1230 * driver; otherwise, < 0 on error.
1239 */ 1231 */
1240static int __devinit 1232static int __devinit ppc4xx_edac_probe(struct platform_device *op)
1241ppc4xx_edac_probe(struct platform_device *op, const struct of_device_id *match)
1242{ 1233{
1243 int status = 0; 1234 int status = 0;
1244 u32 mcopt1, memcheck; 1235 u32 mcopt1, memcheck;
@@ -1304,7 +1295,7 @@ ppc4xx_edac_probe(struct platform_device *op, const struct of_device_id *match)
1304 goto done; 1295 goto done;
1305 } 1296 }
1306 1297
1307 status = ppc4xx_edac_mc_init(mci, op, match, &dcr_host, mcopt1); 1298 status = ppc4xx_edac_mc_init(mci, op, &dcr_host, mcopt1);
1308 1299
1309 if (status) { 1300 if (status) {
1310 ppc4xx_edac_mc_printk(KERN_ERR, mci, 1301 ppc4xx_edac_mc_printk(KERN_ERR, mci,
@@ -1421,7 +1412,7 @@ ppc4xx_edac_init(void)
1421 1412
1422 ppc4xx_edac_opstate_init(); 1413 ppc4xx_edac_opstate_init();
1423 1414
1424 return of_register_platform_driver(&ppc4xx_edac_driver); 1415 return platform_driver_register(&ppc4xx_edac_driver);
1425} 1416}
1426 1417
1427/** 1418/**
@@ -1434,7 +1425,7 @@ ppc4xx_edac_init(void)
1434static void __exit 1425static void __exit
1435ppc4xx_edac_exit(void) 1426ppc4xx_edac_exit(void)
1436{ 1427{
1437 of_unregister_platform_driver(&ppc4xx_edac_driver); 1428 platform_driver_unregister(&ppc4xx_edac_driver);
1438} 1429}
1439 1430
1440module_init(ppc4xx_edac_init); 1431module_init(ppc4xx_edac_init);
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 290cb325a94c..116a49ce74b2 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -645,8 +645,7 @@ static void smu_expose_childs(struct work_struct *unused)
645 645
646static DECLARE_WORK(smu_expose_childs_work, smu_expose_childs); 646static DECLARE_WORK(smu_expose_childs_work, smu_expose_childs);
647 647
648static int smu_platform_probe(struct platform_device* dev, 648static int smu_platform_probe(struct platform_device* dev)
649 const struct of_device_id *match)
650{ 649{
651 if (!smu) 650 if (!smu)
652 return -ENODEV; 651 return -ENODEV;
@@ -669,7 +668,7 @@ static const struct of_device_id smu_platform_match[] =
669 {}, 668 {},
670}; 669};
671 670
672static struct of_platform_driver smu_of_platform_driver = 671static struct platform_driver smu_of_platform_driver =
673{ 672{
674 .driver = { 673 .driver = {
675 .name = "smu", 674 .name = "smu",
@@ -689,7 +688,7 @@ static int __init smu_init_sysfs(void)
689 * I'm a bit too far from figuring out how that works with those 688 * I'm a bit too far from figuring out how that works with those
690 * new chipsets, but that will come back and bite us 689 * new chipsets, but that will come back and bite us
691 */ 690 */
692 of_register_platform_driver(&smu_of_platform_driver); 691 platform_driver_register(&smu_of_platform_driver);
693 return 0; 692 return 0;
694} 693}
695 694
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c
index f3a29f264db9..bca2af2e3760 100644
--- a/drivers/macintosh/therm_pm72.c
+++ b/drivers/macintosh/therm_pm72.c
@@ -2210,7 +2210,7 @@ static void fcu_lookup_fans(struct device_node *fcu_node)
2210 } 2210 }
2211} 2211}
2212 2212
2213static int fcu_of_probe(struct platform_device* dev, const struct of_device_id *match) 2213static int fcu_of_probe(struct platform_device* dev)
2214{ 2214{
2215 state = state_detached; 2215 state = state_detached;
2216 of_dev = dev; 2216 of_dev = dev;
@@ -2240,7 +2240,7 @@ static const struct of_device_id fcu_match[] =
2240}; 2240};
2241MODULE_DEVICE_TABLE(of, fcu_match); 2241MODULE_DEVICE_TABLE(of, fcu_match);
2242 2242
2243static struct of_platform_driver fcu_of_platform_driver = 2243static struct platform_driver fcu_of_platform_driver =
2244{ 2244{
2245 .driver = { 2245 .driver = {
2246 .name = "temperature", 2246 .name = "temperature",
@@ -2263,12 +2263,12 @@ static int __init therm_pm72_init(void)
2263 !rackmac) 2263 !rackmac)
2264 return -ENODEV; 2264 return -ENODEV;
2265 2265
2266 return of_register_platform_driver(&fcu_of_platform_driver); 2266 return platform_driver_register(&fcu_of_platform_driver);
2267} 2267}
2268 2268
2269static void __exit therm_pm72_exit(void) 2269static void __exit therm_pm72_exit(void)
2270{ 2270{
2271 of_unregister_platform_driver(&fcu_of_platform_driver); 2271 platform_driver_unregister(&fcu_of_platform_driver);
2272} 2272}
2273 2273
2274module_init(therm_pm72_init); 2274module_init(therm_pm72_init);
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c
index c89f396e4c53..d37819fd5ad3 100644
--- a/drivers/macintosh/therm_windtunnel.c
+++ b/drivers/macintosh/therm_windtunnel.c
@@ -443,8 +443,7 @@ static struct i2c_driver g4fan_driver = {
443/* initialization / cleanup */ 443/* initialization / cleanup */
444/************************************************************************/ 444/************************************************************************/
445 445
446static int 446static int therm_of_probe(struct platform_device *dev)
447therm_of_probe( struct platform_device *dev, const struct of_device_id *match )
448{ 447{
449 return i2c_add_driver( &g4fan_driver ); 448 return i2c_add_driver( &g4fan_driver );
450} 449}
@@ -462,7 +461,7 @@ static const struct of_device_id therm_of_match[] = {{
462 }, {} 461 }, {}
463}; 462};
464 463
465static struct of_platform_driver therm_of_driver = { 464static struct platform_driver therm_of_driver = {
466 .driver = { 465 .driver = {
467 .name = "temperature", 466 .name = "temperature",
468 .owner = THIS_MODULE, 467 .owner = THIS_MODULE,
@@ -509,14 +508,14 @@ g4fan_init( void )
509 return -ENODEV; 508 return -ENODEV;
510 } 509 }
511 510
512 of_register_platform_driver( &therm_of_driver ); 511 platform_driver_register( &therm_of_driver );
513 return 0; 512 return 0;
514} 513}
515 514
516static void __exit 515static void __exit
517g4fan_exit( void ) 516g4fan_exit( void )
518{ 517{
519 of_unregister_platform_driver( &therm_of_driver ); 518 platform_driver_unregister( &therm_of_driver );
520 519
521 if( x.of_dev ) 520 if( x.of_dev )
522 of_device_unregister( x.of_dev ); 521 of_device_unregister( x.of_dev );