diff options
59 files changed, 109 insertions, 124 deletions
diff --git a/arch/microblaze/kernel/of_platform.c b/arch/microblaze/kernel/of_platform.c index fb2866104331..80c9c493cb25 100644 --- a/arch/microblaze/kernel/of_platform.c +++ b/arch/microblaze/kernel/of_platform.c | |||
@@ -57,8 +57,7 @@ struct of_device *of_find_device_by_node(struct device_node *np) | |||
57 | { | 57 | { |
58 | struct device *dev; | 58 | struct device *dev; |
59 | 59 | ||
60 | dev = bus_find_device(&of_platform_bus_type, | 60 | dev = bus_find_device(&platform_bus_type, NULL, np, of_dev_node_match); |
61 | NULL, np, of_dev_node_match); | ||
62 | if (dev) | 61 | if (dev) |
63 | return to_of_device(dev); | 62 | return to_of_device(dev); |
64 | return NULL; | 63 | return NULL; |
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index d3497cd81e8a..b093d4b1f09c 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -61,8 +61,7 @@ struct of_device *of_find_device_by_node(struct device_node *np) | |||
61 | { | 61 | { |
62 | struct device *dev; | 62 | struct device *dev; |
63 | 63 | ||
64 | dev = bus_find_device(&of_platform_bus_type, | 64 | dev = bus_find_device(&platform_bus_type, NULL, np, of_dev_node_match); |
65 | NULL, np, of_dev_node_match); | ||
66 | if (dev) | 65 | if (dev) |
67 | return to_of_device(dev); | 66 | return to_of_device(dev); |
68 | return NULL; | 67 | return NULL; |
diff --git a/arch/sparc/include/asm/of_platform.h b/arch/sparc/include/asm/of_platform.h index 90da99059f83..26540ddfc511 100644 --- a/arch/sparc/include/asm/of_platform.h +++ b/arch/sparc/include/asm/of_platform.h | |||
@@ -13,6 +13,4 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #define of_bus_type of_platform_bus_type /* for compatibility */ | ||
17 | |||
18 | #endif | 16 | #endif |
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h index 0c34a8792fc7..4891fbce1114 100644 --- a/arch/sparc/include/asm/parport.h +++ b/arch/sparc/include/asm/parport.h | |||
@@ -243,9 +243,7 @@ static struct of_platform_driver ecpp_driver = { | |||
243 | 243 | ||
244 | static int parport_pc_find_nonpci_ports(int autoirq, int autodma) | 244 | static int parport_pc_find_nonpci_ports(int autoirq, int autodma) |
245 | { | 245 | { |
246 | of_register_driver(&ecpp_driver, &of_bus_type); | 246 | return of_register_platform_driver(&ecpp_driver); |
247 | |||
248 | return 0; | ||
249 | } | 247 | } |
250 | 248 | ||
251 | #endif /* !(_ASM_SPARC64_PARPORT_H */ | 249 | #endif /* !(_ASM_SPARC64_PARPORT_H */ |
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c index b27476caa133..c471251cd3f1 100644 --- a/arch/sparc/kernel/apc.c +++ b/arch/sparc/kernel/apc.c | |||
@@ -184,7 +184,7 @@ static struct of_platform_driver apc_driver = { | |||
184 | 184 | ||
185 | static int __init apc_init(void) | 185 | static int __init apc_init(void) |
186 | { | 186 | { |
187 | return of_register_driver(&apc_driver, &of_bus_type); | 187 | return of_register_platform_driver(&apc_driver); |
188 | } | 188 | } |
189 | 189 | ||
190 | /* 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 ddc84128b3c2..46ba58a8510f 100644 --- a/arch/sparc/kernel/auxio_64.c +++ b/arch/sparc/kernel/auxio_64.c | |||
@@ -142,7 +142,7 @@ static struct of_platform_driver auxio_driver = { | |||
142 | 142 | ||
143 | static int __init auxio_init(void) | 143 | static int __init auxio_init(void) |
144 | { | 144 | { |
145 | return of_register_driver(&auxio_driver, &of_platform_bus_type); | 145 | return of_register_platform_driver(&auxio_driver); |
146 | } | 146 | } |
147 | 147 | ||
148 | /* 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 434335f65823..b6080c39ed4b 100644 --- a/arch/sparc/kernel/central.c +++ b/arch/sparc/kernel/central.c | |||
@@ -265,8 +265,8 @@ static struct of_platform_driver fhc_driver = { | |||
265 | 265 | ||
266 | static int __init sunfire_init(void) | 266 | static int __init sunfire_init(void) |
267 | { | 267 | { |
268 | (void) of_register_driver(&fhc_driver, &of_platform_bus_type); | 268 | (void) of_register_platform_driver(&fhc_driver); |
269 | (void) of_register_driver(&clock_board_driver, &of_platform_bus_type); | 269 | (void) of_register_platform_driver(&clock_board_driver); |
270 | return 0; | 270 | return 0; |
271 | } | 271 | } |
272 | 272 | ||
diff --git a/arch/sparc/kernel/chmc.c b/arch/sparc/kernel/chmc.c index 870cb65b3f21..04bb7df9f716 100644 --- a/arch/sparc/kernel/chmc.c +++ b/arch/sparc/kernel/chmc.c | |||
@@ -848,7 +848,7 @@ static int __init us3mc_init(void) | |||
848 | ret = register_dimm_printer(us3mc_dimm_printer); | 848 | ret = register_dimm_printer(us3mc_dimm_printer); |
849 | 849 | ||
850 | if (!ret) { | 850 | if (!ret) { |
851 | ret = of_register_driver(&us3mc_driver, &of_bus_type); | 851 | ret = of_register_platform_driver(&us3mc_driver); |
852 | if (ret) | 852 | if (ret) |
853 | unregister_dimm_printer(us3mc_dimm_printer); | 853 | unregister_dimm_printer(us3mc_dimm_printer); |
854 | } | 854 | } |
@@ -859,7 +859,7 @@ static void __exit us3mc_cleanup(void) | |||
859 | { | 859 | { |
860 | if (us3mc_platform()) { | 860 | if (us3mc_platform()) { |
861 | unregister_dimm_printer(us3mc_dimm_printer); | 861 | unregister_dimm_printer(us3mc_dimm_printer); |
862 | of_unregister_driver(&us3mc_driver); | 862 | of_unregister_platform_driver(&us3mc_driver); |
863 | } | 863 | } |
864 | } | 864 | } |
865 | 865 | ||
diff --git a/arch/sparc/kernel/of_device_common.c b/arch/sparc/kernel/of_device_common.c index 01f380c7995c..2a5c639e4c3f 100644 --- a/arch/sparc/kernel/of_device_common.c +++ b/arch/sparc/kernel/of_device_common.c | |||
@@ -21,7 +21,7 @@ static int node_match(struct device *dev, void *data) | |||
21 | 21 | ||
22 | struct of_device *of_find_device_by_node(struct device_node *dp) | 22 | struct of_device *of_find_device_by_node(struct device_node *dp) |
23 | { | 23 | { |
24 | struct device *dev = bus_find_device(&of_platform_bus_type, NULL, | 24 | struct device *dev = bus_find_device(&platform_bus_type, NULL, |
25 | dp, node_match); | 25 | dp, node_match); |
26 | 26 | ||
27 | if (dev) | 27 | if (dev) |
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c index 51cfa09e392a..885f10b742e2 100644 --- a/arch/sparc/kernel/pci_fire.c +++ b/arch/sparc/kernel/pci_fire.c | |||
@@ -518,7 +518,7 @@ static struct of_platform_driver fire_driver = { | |||
518 | 518 | ||
519 | static int __init fire_init(void) | 519 | static int __init fire_init(void) |
520 | { | 520 | { |
521 | return of_register_driver(&fire_driver, &of_bus_type); | 521 | return of_register_platform_driver(&fire_driver); |
522 | } | 522 | } |
523 | 523 | ||
524 | subsys_initcall(fire_init); | 524 | subsys_initcall(fire_init); |
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c index 93011e6e7ddc..71550a7aacd8 100644 --- a/arch/sparc/kernel/pci_psycho.c +++ b/arch/sparc/kernel/pci_psycho.c | |||
@@ -612,7 +612,7 @@ static struct of_platform_driver psycho_driver = { | |||
612 | 612 | ||
613 | static int __init psycho_init(void) | 613 | static int __init psycho_init(void) |
614 | { | 614 | { |
615 | return of_register_driver(&psycho_driver, &of_bus_type); | 615 | return of_register_platform_driver(&psycho_driver); |
616 | } | 616 | } |
617 | 617 | ||
618 | subsys_initcall(psycho_init); | 618 | subsys_initcall(psycho_init); |
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c index 99c6dba7d4fd..2d7bf30552dd 100644 --- a/arch/sparc/kernel/pci_sabre.c +++ b/arch/sparc/kernel/pci_sabre.c | |||
@@ -606,7 +606,7 @@ static struct of_platform_driver sabre_driver = { | |||
606 | 606 | ||
607 | static int __init sabre_init(void) | 607 | static int __init sabre_init(void) |
608 | { | 608 | { |
609 | return of_register_driver(&sabre_driver, &of_bus_type); | 609 | return of_register_platform_driver(&sabre_driver); |
610 | } | 610 | } |
611 | 611 | ||
612 | subsys_initcall(sabre_init); | 612 | subsys_initcall(sabre_init); |
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 9041dae7aaca..04f29c46bfa0 100644 --- a/arch/sparc/kernel/pci_schizo.c +++ b/arch/sparc/kernel/pci_schizo.c | |||
@@ -1501,7 +1501,7 @@ static struct of_platform_driver schizo_driver = { | |||
1501 | 1501 | ||
1502 | static int __init schizo_init(void) | 1502 | static int __init schizo_init(void) |
1503 | { | 1503 | { |
1504 | return of_register_driver(&schizo_driver, &of_bus_type); | 1504 | return of_register_platform_driver(&schizo_driver); |
1505 | } | 1505 | } |
1506 | 1506 | ||
1507 | subsys_initcall(schizo_init); | 1507 | subsys_initcall(schizo_init); |
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index a24af6f7e17f..18ee8b6f4036 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
@@ -1019,7 +1019,7 @@ static struct of_platform_driver pci_sun4v_driver = { | |||
1019 | 1019 | ||
1020 | static int __init pci_sun4v_init(void) | 1020 | static int __init pci_sun4v_init(void) |
1021 | { | 1021 | { |
1022 | return of_register_driver(&pci_sun4v_driver, &of_bus_type); | 1022 | return of_register_platform_driver(&pci_sun4v_driver); |
1023 | } | 1023 | } |
1024 | 1024 | ||
1025 | subsys_initcall(pci_sun4v_init); | 1025 | subsys_initcall(pci_sun4v_init); |
diff --git a/arch/sparc/kernel/pmc.c b/arch/sparc/kernel/pmc.c index 9589d8b9b0c1..a4c73edc8975 100644 --- a/arch/sparc/kernel/pmc.c +++ b/arch/sparc/kernel/pmc.c | |||
@@ -89,7 +89,7 @@ static struct of_platform_driver pmc_driver = { | |||
89 | 89 | ||
90 | static int __init pmc_init(void) | 90 | static int __init pmc_init(void) |
91 | { | 91 | { |
92 | return of_register_driver(&pmc_driver, &of_bus_type); | 92 | return of_register_platform_driver(&pmc_driver); |
93 | } | 93 | } |
94 | 94 | ||
95 | /* This driver is not critical to the boot process | 95 | /* This driver is not critical to the boot process |
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c index 1cfee577f6b5..abc194ed5a78 100644 --- a/arch/sparc/kernel/power.c +++ b/arch/sparc/kernel/power.c | |||
@@ -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_driver(&power_driver, &of_platform_bus_type); | 73 | return of_register_platform_driver(&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 e404b063be2c..5dc20216952e 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c | |||
@@ -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_driver(&clock_driver, &of_platform_bus_type); | 192 | return of_register_platform_driver(&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 21e9fcae0668..2423b336a717 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -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_driver(&rtc_driver, &of_platform_bus_type); | 589 | (void) of_register_platform_driver(&rtc_driver); |
590 | (void) of_register_driver(&mostek_driver, &of_platform_bus_type); | 590 | (void) of_register_platform_driver(&mostek_driver); |
591 | (void) of_register_driver(&bq4802_driver, &of_platform_bus_type); | 591 | (void) of_register_platform_driver(&bq4802_driver); |
592 | 592 | ||
593 | return 0; | 593 | return 0; |
594 | } | 594 | } |
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 38df87b198d5..b7385e077717 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -2795,7 +2795,7 @@ static int __init fore200e_module_init(void) | |||
2795 | printk(FORE200E "FORE Systems 200E-series ATM driver - version " FORE200E_VERSION "\n"); | 2795 | printk(FORE200E "FORE Systems 200E-series ATM driver - version " FORE200E_VERSION "\n"); |
2796 | 2796 | ||
2797 | #ifdef CONFIG_SBUS | 2797 | #ifdef CONFIG_SBUS |
2798 | err = of_register_driver(&fore200e_sba_driver, &of_bus_type); | 2798 | err = of_register_platform_driver(&fore200e_sba_driver); |
2799 | if (err) | 2799 | if (err) |
2800 | return err; | 2800 | return err; |
2801 | #endif | 2801 | #endif |
@@ -2806,7 +2806,7 @@ static int __init fore200e_module_init(void) | |||
2806 | 2806 | ||
2807 | #ifdef CONFIG_SBUS | 2807 | #ifdef CONFIG_SBUS |
2808 | if (err) | 2808 | if (err) |
2809 | of_unregister_driver(&fore200e_sba_driver); | 2809 | of_unregister_platform_driver(&fore200e_sba_driver); |
2810 | #endif | 2810 | #endif |
2811 | 2811 | ||
2812 | return err; | 2812 | return err; |
@@ -2818,7 +2818,7 @@ static void __exit fore200e_module_cleanup(void) | |||
2818 | pci_unregister_driver(&fore200e_pca_driver); | 2818 | pci_unregister_driver(&fore200e_pca_driver); |
2819 | #endif | 2819 | #endif |
2820 | #ifdef CONFIG_SBUS | 2820 | #ifdef CONFIG_SBUS |
2821 | of_unregister_driver(&fore200e_sba_driver); | 2821 | of_unregister_platform_driver(&fore200e_sba_driver); |
2822 | #endif | 2822 | #endif |
2823 | } | 2823 | } |
2824 | 2824 | ||
diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c index 0f9cbf1aaf15..d8a4ca87987d 100644 --- a/drivers/char/hw_random/n2-drv.c +++ b/drivers/char/hw_random/n2-drv.c | |||
@@ -762,12 +762,12 @@ static struct of_platform_driver n2rng_driver = { | |||
762 | 762 | ||
763 | static int __init n2rng_init(void) | 763 | static int __init n2rng_init(void) |
764 | { | 764 | { |
765 | return of_register_driver(&n2rng_driver, &of_bus_type); | 765 | return of_register_platform_driver(&n2rng_driver); |
766 | } | 766 | } |
767 | 767 | ||
768 | static void __exit n2rng_exit(void) | 768 | static void __exit n2rng_exit(void) |
769 | { | 769 | { |
770 | of_unregister_driver(&n2rng_driver); | 770 | of_unregister_platform_driver(&n2rng_driver); |
771 | } | 771 | } |
772 | 772 | ||
773 | module_init(n2rng_init); | 773 | module_init(n2rng_init); |
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c index 23163fda5035..34ac8ac8aaec 100644 --- a/drivers/crypto/n2_core.c +++ b/drivers/crypto/n2_core.c | |||
@@ -2070,20 +2070,20 @@ static struct of_platform_driver n2_mau_driver = { | |||
2070 | 2070 | ||
2071 | static int __init n2_init(void) | 2071 | static int __init n2_init(void) |
2072 | { | 2072 | { |
2073 | int err = of_register_driver(&n2_crypto_driver, &of_bus_type); | 2073 | int err = of_register_platform_driver(&n2_crypto_driver); |
2074 | 2074 | ||
2075 | if (!err) { | 2075 | if (!err) { |
2076 | err = of_register_driver(&n2_mau_driver, &of_bus_type); | 2076 | err = of_register_platform_driver(&n2_mau_driver); |
2077 | if (err) | 2077 | if (err) |
2078 | of_unregister_driver(&n2_crypto_driver); | 2078 | of_unregister_platform_driver(&n2_crypto_driver); |
2079 | } | 2079 | } |
2080 | return err; | 2080 | return err; |
2081 | } | 2081 | } |
2082 | 2082 | ||
2083 | static void __exit n2_exit(void) | 2083 | static void __exit n2_exit(void) |
2084 | { | 2084 | { |
2085 | of_unregister_driver(&n2_mau_driver); | 2085 | of_unregister_platform_driver(&n2_mau_driver); |
2086 | of_unregister_driver(&n2_crypto_driver); | 2086 | of_unregister_platform_driver(&n2_crypto_driver); |
2087 | } | 2087 | } |
2088 | 2088 | ||
2089 | module_init(n2_init); | 2089 | module_init(n2_init); |
diff --git a/drivers/hwmon/ultra45_env.c b/drivers/hwmon/ultra45_env.c index 5da5942cf970..89643261ccdb 100644 --- a/drivers/hwmon/ultra45_env.c +++ b/drivers/hwmon/ultra45_env.c | |||
@@ -311,12 +311,12 @@ static struct of_platform_driver env_driver = { | |||
311 | 311 | ||
312 | static int __init env_init(void) | 312 | static int __init env_init(void) |
313 | { | 313 | { |
314 | return of_register_driver(&env_driver, &of_bus_type); | 314 | return of_register_platform_driver(&env_driver); |
315 | } | 315 | } |
316 | 316 | ||
317 | static void __exit env_exit(void) | 317 | static void __exit env_exit(void) |
318 | { | 318 | { |
319 | of_unregister_driver(&env_driver); | 319 | of_unregister_platform_driver(&env_driver); |
320 | } | 320 | } |
321 | 321 | ||
322 | module_init(env_init); | 322 | module_init(env_init); |
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c index 1dacae4b43f0..f3bb92e9755f 100644 --- a/drivers/input/misc/sparcspkr.c +++ b/drivers/input/misc/sparcspkr.c | |||
@@ -353,14 +353,12 @@ static struct of_platform_driver grover_beep_driver = { | |||
353 | 353 | ||
354 | static int __init sparcspkr_init(void) | 354 | static int __init sparcspkr_init(void) |
355 | { | 355 | { |
356 | int err = of_register_driver(&bbc_beep_driver, | 356 | int err = of_register_platform_driver(&bbc_beep_driver); |
357 | &of_platform_bus_type); | ||
358 | 357 | ||
359 | if (!err) { | 358 | if (!err) { |
360 | err = of_register_driver(&grover_beep_driver, | 359 | err = of_register_platform_driver(&grover_beep_driver); |
361 | &of_platform_bus_type); | ||
362 | if (err) | 360 | if (err) |
363 | of_unregister_driver(&bbc_beep_driver); | 361 | of_unregister_platform_driver(&bbc_beep_driver); |
364 | } | 362 | } |
365 | 363 | ||
366 | return err; | 364 | return err; |
@@ -368,8 +366,8 @@ static int __init sparcspkr_init(void) | |||
368 | 366 | ||
369 | static void __exit sparcspkr_exit(void) | 367 | static void __exit sparcspkr_exit(void) |
370 | { | 368 | { |
371 | of_unregister_driver(&bbc_beep_driver); | 369 | of_unregister_platform_driver(&bbc_beep_driver); |
372 | of_unregister_driver(&grover_beep_driver); | 370 | of_unregister_platform_driver(&grover_beep_driver); |
373 | } | 371 | } |
374 | 372 | ||
375 | module_init(sparcspkr_init); | 373 | module_init(sparcspkr_init); |
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h index c7d50ff43fca..cb2a24b94746 100644 --- a/drivers/input/serio/i8042-sparcio.h +++ b/drivers/input/serio/i8042-sparcio.h | |||
@@ -116,8 +116,7 @@ static int __init i8042_platform_init(void) | |||
116 | if (!kbd_iobase) | 116 | if (!kbd_iobase) |
117 | return -ENODEV; | 117 | return -ENODEV; |
118 | } else { | 118 | } else { |
119 | int err = of_register_driver(&sparc_i8042_driver, | 119 | int err = of_register_platform_driver(&sparc_i8042_driver); |
120 | &of_bus_type); | ||
121 | if (err) | 120 | if (err) |
122 | return err; | 121 | return err; |
123 | 122 | ||
@@ -141,7 +140,7 @@ static inline void i8042_platform_exit(void) | |||
141 | struct device_node *root = of_find_node_by_path("/"); | 140 | struct device_node *root = of_find_node_by_path("/"); |
142 | 141 | ||
143 | if (strcmp(root->name, "SUNW,JavaStation-1")) | 142 | if (strcmp(root->name, "SUNW,JavaStation-1")) |
144 | of_unregister_driver(&sparc_i8042_driver); | 143 | of_unregister_platform_driver(&sparc_i8042_driver); |
145 | } | 144 | } |
146 | 145 | ||
147 | #else /* !CONFIG_PCI */ | 146 | #else /* !CONFIG_PCI */ |
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index 0391c2527bd7..8984236a8d0a 100644 --- a/drivers/mtd/maps/sun_uflash.c +++ b/drivers/mtd/maps/sun_uflash.c | |||
@@ -160,12 +160,12 @@ static struct of_platform_driver uflash_driver = { | |||
160 | 160 | ||
161 | static int __init uflash_init(void) | 161 | static int __init uflash_init(void) |
162 | { | 162 | { |
163 | return of_register_driver(&uflash_driver, &of_bus_type); | 163 | return of_register_platform_driver(&uflash_driver); |
164 | } | 164 | } |
165 | 165 | ||
166 | static void __exit uflash_exit(void) | 166 | static void __exit uflash_exit(void) |
167 | { | 167 | { |
168 | of_unregister_driver(&uflash_driver); | 168 | of_unregister_platform_driver(&uflash_driver); |
169 | } | 169 | } |
170 | 170 | ||
171 | module_init(uflash_init); | 171 | module_init(uflash_init); |
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index b150c102ca5a..f10476fb2623 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -2339,11 +2339,11 @@ static int __devinit emac_wait_deps(struct emac_instance *dev) | |||
2339 | deps[EMAC_DEP_MDIO_IDX].phandle = dev->mdio_ph; | 2339 | deps[EMAC_DEP_MDIO_IDX].phandle = dev->mdio_ph; |
2340 | if (dev->blist && dev->blist > emac_boot_list) | 2340 | if (dev->blist && dev->blist > emac_boot_list) |
2341 | deps[EMAC_DEP_PREV_IDX].phandle = 0xffffffffu; | 2341 | deps[EMAC_DEP_PREV_IDX].phandle = 0xffffffffu; |
2342 | bus_register_notifier(&of_platform_bus_type, &emac_of_bus_notifier); | 2342 | bus_register_notifier(&platform_bus_type, &emac_of_bus_notifier); |
2343 | wait_event_timeout(emac_probe_wait, | 2343 | wait_event_timeout(emac_probe_wait, |
2344 | emac_check_deps(dev, deps), | 2344 | emac_check_deps(dev, deps), |
2345 | EMAC_PROBE_DEP_TIMEOUT); | 2345 | EMAC_PROBE_DEP_TIMEOUT); |
2346 | bus_unregister_notifier(&of_platform_bus_type, &emac_of_bus_notifier); | 2346 | bus_unregister_notifier(&platform_bus_type, &emac_of_bus_notifier); |
2347 | err = emac_check_deps(dev, deps) ? 0 : -ENODEV; | 2347 | err = emac_check_deps(dev, deps) ? 0 : -ENODEV; |
2348 | for (i = 0; i < EMAC_DEP_COUNT; i++) { | 2348 | for (i = 0; i < EMAC_DEP_COUNT; i++) { |
2349 | if (deps[i].node) | 2349 | if (deps[i].node) |
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index 370d3c17f24c..04e552aa14ec 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
@@ -1172,12 +1172,12 @@ static struct of_platform_driver myri_sbus_driver = { | |||
1172 | 1172 | ||
1173 | static int __init myri_sbus_init(void) | 1173 | static int __init myri_sbus_init(void) |
1174 | { | 1174 | { |
1175 | return of_register_driver(&myri_sbus_driver, &of_bus_type); | 1175 | return of_register_platform_driver(&myri_sbus_driver); |
1176 | } | 1176 | } |
1177 | 1177 | ||
1178 | static void __exit myri_sbus_exit(void) | 1178 | static void __exit myri_sbus_exit(void) |
1179 | { | 1179 | { |
1180 | of_unregister_driver(&myri_sbus_driver); | 1180 | of_unregister_platform_driver(&myri_sbus_driver); |
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | module_init(myri_sbus_init); | 1183 | module_init(myri_sbus_init); |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index f6ecf6180f72..8cb2b30eccae 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -10251,14 +10251,14 @@ static int __init niu_init(void) | |||
10251 | niu_debug = netif_msg_init(debug, NIU_MSG_DEFAULT); | 10251 | niu_debug = netif_msg_init(debug, NIU_MSG_DEFAULT); |
10252 | 10252 | ||
10253 | #ifdef CONFIG_SPARC64 | 10253 | #ifdef CONFIG_SPARC64 |
10254 | err = of_register_driver(&niu_of_driver, &of_bus_type); | 10254 | err = of_register_platform_driver(&niu_of_driver); |
10255 | #endif | 10255 | #endif |
10256 | 10256 | ||
10257 | if (!err) { | 10257 | if (!err) { |
10258 | err = pci_register_driver(&niu_pci_driver); | 10258 | err = pci_register_driver(&niu_pci_driver); |
10259 | #ifdef CONFIG_SPARC64 | 10259 | #ifdef CONFIG_SPARC64 |
10260 | if (err) | 10260 | if (err) |
10261 | of_unregister_driver(&niu_of_driver); | 10261 | of_unregister_platform_driver(&niu_of_driver); |
10262 | #endif | 10262 | #endif |
10263 | } | 10263 | } |
10264 | 10264 | ||
@@ -10269,7 +10269,7 @@ static void __exit niu_exit(void) | |||
10269 | { | 10269 | { |
10270 | pci_unregister_driver(&niu_pci_driver); | 10270 | pci_unregister_driver(&niu_pci_driver); |
10271 | #ifdef CONFIG_SPARC64 | 10271 | #ifdef CONFIG_SPARC64 |
10272 | of_unregister_driver(&niu_of_driver); | 10272 | of_unregister_platform_driver(&niu_of_driver); |
10273 | #endif | 10273 | #endif |
10274 | } | 10274 | } |
10275 | 10275 | ||
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index 0b10d24de051..09c071bd6ad4 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c | |||
@@ -1301,12 +1301,12 @@ static struct of_platform_driver bigmac_sbus_driver = { | |||
1301 | 1301 | ||
1302 | static int __init bigmac_init(void) | 1302 | static int __init bigmac_init(void) |
1303 | { | 1303 | { |
1304 | return of_register_driver(&bigmac_sbus_driver, &of_bus_type); | 1304 | return of_register_platform_driver(&bigmac_sbus_driver); |
1305 | } | 1305 | } |
1306 | 1306 | ||
1307 | static void __exit bigmac_exit(void) | 1307 | static void __exit bigmac_exit(void) |
1308 | { | 1308 | { |
1309 | of_unregister_driver(&bigmac_sbus_driver); | 1309 | of_unregister_platform_driver(&bigmac_sbus_driver); |
1310 | } | 1310 | } |
1311 | 1311 | ||
1312 | module_init(bigmac_init); | 1312 | module_init(bigmac_init); |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 0a63ebef86a0..eec443f64079 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -3304,7 +3304,7 @@ static int __init happy_meal_sbus_init(void) | |||
3304 | { | 3304 | { |
3305 | int err; | 3305 | int err; |
3306 | 3306 | ||
3307 | err = of_register_driver(&hme_sbus_driver, &of_bus_type); | 3307 | err = of_register_platform_driver(&hme_sbus_driver); |
3308 | if (!err) | 3308 | if (!err) |
3309 | err = quattro_sbus_register_irqs(); | 3309 | err = quattro_sbus_register_irqs(); |
3310 | 3310 | ||
@@ -3313,7 +3313,7 @@ static int __init happy_meal_sbus_init(void) | |||
3313 | 3313 | ||
3314 | static void happy_meal_sbus_exit(void) | 3314 | static void happy_meal_sbus_exit(void) |
3315 | { | 3315 | { |
3316 | of_unregister_driver(&hme_sbus_driver); | 3316 | of_unregister_platform_driver(&hme_sbus_driver); |
3317 | quattro_sbus_free_irqs(); | 3317 | quattro_sbus_free_irqs(); |
3318 | 3318 | ||
3319 | while (qfe_sbus_list) { | 3319 | while (qfe_sbus_list) { |
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index c6bfdad6c0c8..ee364fa75634 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -1558,12 +1558,12 @@ static struct of_platform_driver sunlance_sbus_driver = { | |||
1558 | /* Find all the lance cards on the system and initialize them */ | 1558 | /* Find all the lance cards on the system and initialize them */ |
1559 | static int __init sparc_lance_init(void) | 1559 | static int __init sparc_lance_init(void) |
1560 | { | 1560 | { |
1561 | return of_register_driver(&sunlance_sbus_driver, &of_bus_type); | 1561 | return of_register_platform_driver(&sunlance_sbus_driver); |
1562 | } | 1562 | } |
1563 | 1563 | ||
1564 | static void __exit sparc_lance_exit(void) | 1564 | static void __exit sparc_lance_exit(void) |
1565 | { | 1565 | { |
1566 | of_unregister_driver(&sunlance_sbus_driver); | 1566 | of_unregister_platform_driver(&sunlance_sbus_driver); |
1567 | } | 1567 | } |
1568 | 1568 | ||
1569 | module_init(sparc_lance_init); | 1569 | module_init(sparc_lance_init); |
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index 446517487084..5f84a5dadedd 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
@@ -988,12 +988,12 @@ static struct of_platform_driver qec_sbus_driver = { | |||
988 | 988 | ||
989 | static int __init qec_init(void) | 989 | static int __init qec_init(void) |
990 | { | 990 | { |
991 | return of_register_driver(&qec_sbus_driver, &of_bus_type); | 991 | return of_register_platform_driver(&qec_sbus_driver); |
992 | } | 992 | } |
993 | 993 | ||
994 | static void __exit qec_exit(void) | 994 | static void __exit qec_exit(void) |
995 | { | 995 | { |
996 | of_unregister_driver(&qec_sbus_driver); | 996 | of_unregister_platform_driver(&qec_sbus_driver); |
997 | 997 | ||
998 | while (root_qec_dev) { | 998 | while (root_qec_dev) { |
999 | struct sunqec *next = root_qec_dev->next_module; | 999 | struct sunqec *next = root_qec_dev->next_module; |
diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c index 3cdfe96e8999..210a6441a066 100644 --- a/drivers/parport/parport_sunbpp.c +++ b/drivers/parport/parport_sunbpp.c | |||
@@ -393,12 +393,12 @@ static struct of_platform_driver bpp_sbus_driver = { | |||
393 | 393 | ||
394 | static int __init parport_sunbpp_init(void) | 394 | static int __init parport_sunbpp_init(void) |
395 | { | 395 | { |
396 | return of_register_driver(&bpp_sbus_driver, &of_bus_type); | 396 | return of_register_platform_driver(&bpp_sbus_driver); |
397 | } | 397 | } |
398 | 398 | ||
399 | static void __exit parport_sunbpp_exit(void) | 399 | static void __exit parport_sunbpp_exit(void) |
400 | { | 400 | { |
401 | of_unregister_driver(&bpp_sbus_driver); | 401 | of_unregister_platform_driver(&bpp_sbus_driver); |
402 | } | 402 | } |
403 | 403 | ||
404 | MODULE_AUTHOR("Derrick J Brashear"); | 404 | MODULE_AUTHOR("Derrick J Brashear"); |
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 40d7a1fc69af..3e89c313e98d 100644 --- a/drivers/sbus/char/bbc_i2c.c +++ b/drivers/sbus/char/bbc_i2c.c | |||
@@ -425,12 +425,12 @@ static struct of_platform_driver bbc_i2c_driver = { | |||
425 | 425 | ||
426 | static int __init bbc_i2c_init(void) | 426 | static int __init bbc_i2c_init(void) |
427 | { | 427 | { |
428 | return of_register_driver(&bbc_i2c_driver, &of_bus_type); | 428 | return of_register_platform_driver(&bbc_i2c_driver); |
429 | } | 429 | } |
430 | 430 | ||
431 | static void __exit bbc_i2c_exit(void) | 431 | static void __exit bbc_i2c_exit(void) |
432 | { | 432 | { |
433 | of_unregister_driver(&bbc_i2c_driver); | 433 | of_unregister_platform_driver(&bbc_i2c_driver); |
434 | } | 434 | } |
435 | 435 | ||
436 | module_init(bbc_i2c_init); | 436 | module_init(bbc_i2c_init); |
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index 7baf1b644039..8fd362e7fa65 100644 --- a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c | |||
@@ -277,12 +277,12 @@ static struct of_platform_driver d7s_driver = { | |||
277 | 277 | ||
278 | static int __init d7s_init(void) | 278 | static int __init d7s_init(void) |
279 | { | 279 | { |
280 | return of_register_driver(&d7s_driver, &of_bus_type); | 280 | return of_register_platform_driver(&d7s_driver); |
281 | } | 281 | } |
282 | 282 | ||
283 | static void __exit d7s_exit(void) | 283 | static void __exit d7s_exit(void) |
284 | { | 284 | { |
285 | of_unregister_driver(&d7s_driver); | 285 | of_unregister_platform_driver(&d7s_driver); |
286 | } | 286 | } |
287 | 287 | ||
288 | module_init(d7s_init); | 288 | module_init(d7s_init); |
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index c8166ecf5276..2c76f700265b 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
@@ -1142,12 +1142,12 @@ static struct of_platform_driver envctrl_driver = { | |||
1142 | 1142 | ||
1143 | static int __init envctrl_init(void) | 1143 | static int __init envctrl_init(void) |
1144 | { | 1144 | { |
1145 | return of_register_driver(&envctrl_driver, &of_bus_type); | 1145 | return of_register_platform_driver(&envctrl_driver); |
1146 | } | 1146 | } |
1147 | 1147 | ||
1148 | static void __exit envctrl_exit(void) | 1148 | static void __exit envctrl_exit(void) |
1149 | { | 1149 | { |
1150 | of_unregister_driver(&envctrl_driver); | 1150 | of_unregister_platform_driver(&envctrl_driver); |
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | module_init(envctrl_init); | 1153 | module_init(envctrl_init); |
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 368d66294d83..d79f386c3486 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c | |||
@@ -218,12 +218,12 @@ static struct of_platform_driver flash_driver = { | |||
218 | 218 | ||
219 | static int __init flash_init(void) | 219 | static int __init flash_init(void) |
220 | { | 220 | { |
221 | return of_register_driver(&flash_driver, &of_bus_type); | 221 | return of_register_platform_driver(&flash_driver); |
222 | } | 222 | } |
223 | 223 | ||
224 | static void __exit flash_cleanup(void) | 224 | static void __exit flash_cleanup(void) |
225 | { | 225 | { |
226 | of_unregister_driver(&flash_driver); | 226 | of_unregister_platform_driver(&flash_driver); |
227 | } | 227 | } |
228 | 228 | ||
229 | module_init(flash_init); | 229 | module_init(flash_init); |
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index b8b40e9eca79..57f0612bb013 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c | |||
@@ -437,12 +437,12 @@ static struct of_platform_driver uctrl_driver = { | |||
437 | 437 | ||
438 | static int __init uctrl_init(void) | 438 | static int __init uctrl_init(void) |
439 | { | 439 | { |
440 | return of_register_driver(&uctrl_driver, &of_bus_type); | 440 | return of_register_platform_driver(&uctrl_driver); |
441 | } | 441 | } |
442 | 442 | ||
443 | static void __exit uctrl_exit(void) | 443 | static void __exit uctrl_exit(void) |
444 | { | 444 | { |
445 | of_unregister_driver(&uctrl_driver); | 445 | of_unregister_platform_driver(&uctrl_driver); |
446 | } | 446 | } |
447 | 447 | ||
448 | module_init(uctrl_init); | 448 | module_init(uctrl_init); |
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 3f5b5411e6bc..53d7ed0dc169 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c | |||
@@ -1467,12 +1467,12 @@ static struct of_platform_driver qpti_sbus_driver = { | |||
1467 | 1467 | ||
1468 | static int __init qpti_init(void) | 1468 | static int __init qpti_init(void) |
1469 | { | 1469 | { |
1470 | return of_register_driver(&qpti_sbus_driver, &of_bus_type); | 1470 | return of_register_platform_driver(&qpti_sbus_driver); |
1471 | } | 1471 | } |
1472 | 1472 | ||
1473 | static void __exit qpti_exit(void) | 1473 | static void __exit qpti_exit(void) |
1474 | { | 1474 | { |
1475 | of_unregister_driver(&qpti_sbus_driver); | 1475 | of_unregister_platform_driver(&qpti_sbus_driver); |
1476 | } | 1476 | } |
1477 | 1477 | ||
1478 | MODULE_DESCRIPTION("QlogicISP SBUS driver"); | 1478 | MODULE_DESCRIPTION("QlogicISP SBUS driver"); |
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c index ddc221acd14c..89ba6fe02f80 100644 --- a/drivers/scsi/sun_esp.c +++ b/drivers/scsi/sun_esp.c | |||
@@ -644,12 +644,12 @@ static struct of_platform_driver esp_sbus_driver = { | |||
644 | 644 | ||
645 | static int __init sunesp_init(void) | 645 | static int __init sunesp_init(void) |
646 | { | 646 | { |
647 | return of_register_driver(&esp_sbus_driver, &of_bus_type); | 647 | return of_register_platform_driver(&esp_sbus_driver); |
648 | } | 648 | } |
649 | 649 | ||
650 | static void __exit sunesp_exit(void) | 650 | static void __exit sunesp_exit(void) |
651 | { | 651 | { |
652 | of_unregister_driver(&esp_sbus_driver); | 652 | of_unregister_platform_driver(&esp_sbus_driver); |
653 | } | 653 | } |
654 | 654 | ||
655 | MODULE_DESCRIPTION("Sun ESP SCSI driver"); | 655 | MODULE_DESCRIPTION("Sun ESP SCSI driver"); |
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index 36e244867dd8..a779e22d213e 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c | |||
@@ -644,12 +644,12 @@ static int __init sunhv_init(void) | |||
644 | if (tlb_type != hypervisor) | 644 | if (tlb_type != hypervisor) |
645 | return -ENODEV; | 645 | return -ENODEV; |
646 | 646 | ||
647 | return of_register_driver(&hv_driver, &of_bus_type); | 647 | return of_register_platform_driver(&hv_driver); |
648 | } | 648 | } |
649 | 649 | ||
650 | static void __exit sunhv_exit(void) | 650 | static void __exit sunhv_exit(void) |
651 | { | 651 | { |
652 | of_unregister_driver(&hv_driver); | 652 | of_unregister_platform_driver(&hv_driver); |
653 | } | 653 | } |
654 | 654 | ||
655 | module_init(sunhv_init); | 655 | module_init(sunhv_init); |
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 0a7dd6841ff8..9845fb1cfb1f 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -1130,12 +1130,12 @@ static int __init sunsab_init(void) | |||
1130 | } | 1130 | } |
1131 | } | 1131 | } |
1132 | 1132 | ||
1133 | return of_register_driver(&sab_driver, &of_bus_type); | 1133 | return of_register_platform_driver(&sab_driver); |
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | static void __exit sunsab_exit(void) | 1136 | static void __exit sunsab_exit(void) |
1137 | { | 1137 | { |
1138 | of_unregister_driver(&sab_driver); | 1138 | of_unregister_platform_driver(&sab_driver); |
1139 | if (sunsab_reg.nr) { | 1139 | if (sunsab_reg.nr) { |
1140 | sunserial_unregister_minors(&sunsab_reg, sunsab_reg.nr); | 1140 | sunserial_unregister_minors(&sunsab_reg, sunsab_reg.nr); |
1141 | } | 1141 | } |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 5deafc8180b5..3cdf74822db5 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -1586,7 +1586,7 @@ static int __init sunsu_init(void) | |||
1586 | return err; | 1586 | return err; |
1587 | } | 1587 | } |
1588 | 1588 | ||
1589 | err = of_register_driver(&su_driver, &of_bus_type); | 1589 | err = of_register_platform_driver(&su_driver); |
1590 | if (err && num_uart) | 1590 | if (err && num_uart) |
1591 | sunserial_unregister_minors(&sunsu_reg, num_uart); | 1591 | sunserial_unregister_minors(&sunsu_reg, num_uart); |
1592 | 1592 | ||
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index fcbe20d48039..d1e6bcb59546 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
@@ -1576,7 +1576,7 @@ static int __init sunzilog_init(void) | |||
1576 | goto out_free_tables; | 1576 | goto out_free_tables; |
1577 | } | 1577 | } |
1578 | 1578 | ||
1579 | err = of_register_driver(&zs_driver, &of_bus_type); | 1579 | err = of_register_platform_driver(&zs_driver); |
1580 | if (err) | 1580 | if (err) |
1581 | goto out_unregister_uart; | 1581 | goto out_unregister_uart; |
1582 | 1582 | ||
@@ -1604,7 +1604,7 @@ out: | |||
1604 | return err; | 1604 | return err; |
1605 | 1605 | ||
1606 | out_unregister_driver: | 1606 | out_unregister_driver: |
1607 | of_unregister_driver(&zs_driver); | 1607 | of_unregister_platform_driver(&zs_driver); |
1608 | 1608 | ||
1609 | out_unregister_uart: | 1609 | out_unregister_uart: |
1610 | if (num_sunzilog) { | 1610 | if (num_sunzilog) { |
@@ -1619,7 +1619,7 @@ out_free_tables: | |||
1619 | 1619 | ||
1620 | static void __exit sunzilog_exit(void) | 1620 | static void __exit sunzilog_exit(void) |
1621 | { | 1621 | { |
1622 | of_unregister_driver(&zs_driver); | 1622 | of_unregister_platform_driver(&zs_driver); |
1623 | 1623 | ||
1624 | if (zilog_irq != -1) { | 1624 | if (zilog_irq != -1) { |
1625 | struct uart_sunzilog_port *up = sunzilog_irq_chain; | 1625 | struct uart_sunzilog_port *up = sunzilog_irq_chain; |
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c index 09f1b9b462f4..c7796637bafd 100644 --- a/drivers/video/bw2.c +++ b/drivers/video/bw2.c | |||
@@ -390,12 +390,12 @@ static int __init bw2_init(void) | |||
390 | if (fb_get_options("bw2fb", NULL)) | 390 | if (fb_get_options("bw2fb", NULL)) |
391 | return -ENODEV; | 391 | return -ENODEV; |
392 | 392 | ||
393 | return of_register_driver(&bw2_driver, &of_bus_type); | 393 | return of_register_platform_driver(&bw2_driver); |
394 | } | 394 | } |
395 | 395 | ||
396 | static void __exit bw2_exit(void) | 396 | static void __exit bw2_exit(void) |
397 | { | 397 | { |
398 | of_unregister_driver(&bw2_driver); | 398 | of_unregister_platform_driver(&bw2_driver); |
399 | } | 399 | } |
400 | 400 | ||
401 | module_init(bw2_init); | 401 | module_init(bw2_init); |
diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c index e5dc2241194f..d09fde8beb69 100644 --- a/drivers/video/cg14.c +++ b/drivers/video/cg14.c | |||
@@ -610,12 +610,12 @@ static int __init cg14_init(void) | |||
610 | if (fb_get_options("cg14fb", NULL)) | 610 | if (fb_get_options("cg14fb", NULL)) |
611 | return -ENODEV; | 611 | return -ENODEV; |
612 | 612 | ||
613 | return of_register_driver(&cg14_driver, &of_bus_type); | 613 | return of_register_platform_driver(&cg14_driver); |
614 | } | 614 | } |
615 | 615 | ||
616 | static void __exit cg14_exit(void) | 616 | static void __exit cg14_exit(void) |
617 | { | 617 | { |
618 | of_unregister_driver(&cg14_driver); | 618 | of_unregister_platform_driver(&cg14_driver); |
619 | } | 619 | } |
620 | 620 | ||
621 | module_init(cg14_init); | 621 | module_init(cg14_init); |
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c index 558d73a948a0..64aa29809fb9 100644 --- a/drivers/video/cg3.c +++ b/drivers/video/cg3.c | |||
@@ -477,12 +477,12 @@ static int __init cg3_init(void) | |||
477 | if (fb_get_options("cg3fb", NULL)) | 477 | if (fb_get_options("cg3fb", NULL)) |
478 | return -ENODEV; | 478 | return -ENODEV; |
479 | 479 | ||
480 | return of_register_driver(&cg3_driver, &of_bus_type); | 480 | return of_register_platform_driver(&cg3_driver); |
481 | } | 481 | } |
482 | 482 | ||
483 | static void __exit cg3_exit(void) | 483 | static void __exit cg3_exit(void) |
484 | { | 484 | { |
485 | of_unregister_driver(&cg3_driver); | 485 | of_unregister_platform_driver(&cg3_driver); |
486 | } | 486 | } |
487 | 487 | ||
488 | module_init(cg3_init); | 488 | module_init(cg3_init); |
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c index 480d761a27a8..2389a719dcc7 100644 --- a/drivers/video/cg6.c +++ b/drivers/video/cg6.c | |||
@@ -870,12 +870,12 @@ static int __init cg6_init(void) | |||
870 | if (fb_get_options("cg6fb", NULL)) | 870 | if (fb_get_options("cg6fb", NULL)) |
871 | return -ENODEV; | 871 | return -ENODEV; |
872 | 872 | ||
873 | return of_register_driver(&cg6_driver, &of_bus_type); | 873 | return of_register_platform_driver(&cg6_driver); |
874 | } | 874 | } |
875 | 875 | ||
876 | static void __exit cg6_exit(void) | 876 | static void __exit cg6_exit(void) |
877 | { | 877 | { |
878 | of_unregister_driver(&cg6_driver); | 878 | of_unregister_platform_driver(&cg6_driver); |
879 | } | 879 | } |
880 | 880 | ||
881 | module_init(cg6_init); | 881 | module_init(cg6_init); |
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c index 95c0227f47fc..f6ecfab296d3 100644 --- a/drivers/video/ffb.c +++ b/drivers/video/ffb.c | |||
@@ -1067,12 +1067,12 @@ static int __init ffb_init(void) | |||
1067 | if (fb_get_options("ffb", NULL)) | 1067 | if (fb_get_options("ffb", NULL)) |
1068 | return -ENODEV; | 1068 | return -ENODEV; |
1069 | 1069 | ||
1070 | return of_register_driver(&ffb_driver, &of_bus_type); | 1070 | return of_register_platform_driver(&ffb_driver); |
1071 | } | 1071 | } |
1072 | 1072 | ||
1073 | static void __exit ffb_exit(void) | 1073 | static void __exit ffb_exit(void) |
1074 | { | 1074 | { |
1075 | of_unregister_driver(&ffb_driver); | 1075 | of_unregister_platform_driver(&ffb_driver); |
1076 | } | 1076 | } |
1077 | 1077 | ||
1078 | module_init(ffb_init); | 1078 | module_init(ffb_init); |
diff --git a/drivers/video/leo.c b/drivers/video/leo.c index 9e8bf7d5e249..ad677637ffbb 100644 --- a/drivers/video/leo.c +++ b/drivers/video/leo.c | |||
@@ -677,12 +677,12 @@ static int __init leo_init(void) | |||
677 | if (fb_get_options("leofb", NULL)) | 677 | if (fb_get_options("leofb", NULL)) |
678 | return -ENODEV; | 678 | return -ENODEV; |
679 | 679 | ||
680 | return of_register_driver(&leo_driver, &of_bus_type); | 680 | return of_register_platform_driver(&leo_driver); |
681 | } | 681 | } |
682 | 682 | ||
683 | static void __exit leo_exit(void) | 683 | static void __exit leo_exit(void) |
684 | { | 684 | { |
685 | of_unregister_driver(&leo_driver); | 685 | of_unregister_platform_driver(&leo_driver); |
686 | } | 686 | } |
687 | 687 | ||
688 | module_init(leo_init); | 688 | module_init(leo_init); |
diff --git a/drivers/video/p9100.c b/drivers/video/p9100.c index 6552751e81aa..688b055abab2 100644 --- a/drivers/video/p9100.c +++ b/drivers/video/p9100.c | |||
@@ -367,12 +367,12 @@ static int __init p9100_init(void) | |||
367 | if (fb_get_options("p9100fb", NULL)) | 367 | if (fb_get_options("p9100fb", NULL)) |
368 | return -ENODEV; | 368 | return -ENODEV; |
369 | 369 | ||
370 | return of_register_driver(&p9100_driver, &of_bus_type); | 370 | return of_register_platform_driver(&p9100_driver); |
371 | } | 371 | } |
372 | 372 | ||
373 | static void __exit p9100_exit(void) | 373 | static void __exit p9100_exit(void) |
374 | { | 374 | { |
375 | of_unregister_driver(&p9100_driver); | 375 | of_unregister_platform_driver(&p9100_driver); |
376 | } | 376 | } |
377 | 377 | ||
378 | module_init(p9100_init); | 378 | module_init(p9100_init); |
diff --git a/drivers/video/sunxvr1000.c b/drivers/video/sunxvr1000.c index 489b44e8db81..7288934c0d49 100644 --- a/drivers/video/sunxvr1000.c +++ b/drivers/video/sunxvr1000.c | |||
@@ -213,12 +213,12 @@ static int __init gfb_init(void) | |||
213 | if (fb_get_options("gfb", NULL)) | 213 | if (fb_get_options("gfb", NULL)) |
214 | return -ENODEV; | 214 | return -ENODEV; |
215 | 215 | ||
216 | return of_register_driver(&gfb_driver, &of_bus_type); | 216 | return of_register_platform_driver(&gfb_driver); |
217 | } | 217 | } |
218 | 218 | ||
219 | static void __exit gfb_exit(void) | 219 | static void __exit gfb_exit(void) |
220 | { | 220 | { |
221 | of_unregister_driver(&gfb_driver); | 221 | of_unregister_platform_driver(&gfb_driver); |
222 | } | 222 | } |
223 | 223 | ||
224 | module_init(gfb_init); | 224 | module_init(gfb_init); |
diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c index cc039b33d2d8..f375e0db6776 100644 --- a/drivers/video/tcx.c +++ b/drivers/video/tcx.c | |||
@@ -526,12 +526,12 @@ static int __init tcx_init(void) | |||
526 | if (fb_get_options("tcxfb", NULL)) | 526 | if (fb_get_options("tcxfb", NULL)) |
527 | return -ENODEV; | 527 | return -ENODEV; |
528 | 528 | ||
529 | return of_register_driver(&tcx_driver, &of_bus_type); | 529 | return of_register_platform_driver(&tcx_driver); |
530 | } | 530 | } |
531 | 531 | ||
532 | static void __exit tcx_exit(void) | 532 | static void __exit tcx_exit(void) |
533 | { | 533 | { |
534 | of_unregister_driver(&tcx_driver); | 534 | of_unregister_platform_driver(&tcx_driver); |
535 | } | 535 | } |
536 | 536 | ||
537 | module_init(tcx_init); | 537 | module_init(tcx_init); |
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index 8c03fd71693e..30a2512fd52e 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c | |||
@@ -688,12 +688,12 @@ static struct of_platform_driver cpwd_driver = { | |||
688 | 688 | ||
689 | static int __init cpwd_init(void) | 689 | static int __init cpwd_init(void) |
690 | { | 690 | { |
691 | return of_register_driver(&cpwd_driver, &of_bus_type); | 691 | return of_register_platform_driver(&cpwd_driver); |
692 | } | 692 | } |
693 | 693 | ||
694 | static void __exit cpwd_exit(void) | 694 | static void __exit cpwd_exit(void) |
695 | { | 695 | { |
696 | of_unregister_driver(&cpwd_driver); | 696 | of_unregister_platform_driver(&cpwd_driver); |
697 | } | 697 | } |
698 | 698 | ||
699 | module_init(cpwd_init); | 699 | module_init(cpwd_init); |
diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c index 5dceeddc8859..4082b4ace1fc 100644 --- a/drivers/watchdog/riowd.c +++ b/drivers/watchdog/riowd.c | |||
@@ -250,12 +250,12 @@ static struct of_platform_driver riowd_driver = { | |||
250 | 250 | ||
251 | static int __init riowd_init(void) | 251 | static int __init riowd_init(void) |
252 | { | 252 | { |
253 | return of_register_driver(&riowd_driver, &of_bus_type); | 253 | return of_register_platform_driver(&riowd_driver); |
254 | } | 254 | } |
255 | 255 | ||
256 | static void __exit riowd_exit(void) | 256 | static void __exit riowd_exit(void) |
257 | { | 257 | { |
258 | of_unregister_driver(&riowd_driver); | 258 | of_unregister_platform_driver(&riowd_driver); |
259 | } | 259 | } |
260 | 260 | ||
261 | module_init(riowd_init); | 261 | module_init(riowd_init); |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 133ecf31a60f..429513ae8f6e 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -19,12 +19,6 @@ | |||
19 | #include <linux/of_device.h> | 19 | #include <linux/of_device.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | 21 | ||
22 | /* | ||
23 | * of_platform_bus_type isn't it's own bus anymore. It's now just an alias | ||
24 | * for the platform bus. | ||
25 | */ | ||
26 | #define of_platform_bus_type platform_bus_type | ||
27 | |||
28 | extern const struct of_device_id of_default_bus_ids[]; | 22 | extern const struct of_device_id of_default_bus_ids[]; |
29 | 23 | ||
30 | /* | 24 | /* |
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c index 43c63d441087..9eb1a4e0363b 100644 --- a/sound/sparc/amd7930.c +++ b/sound/sparc/amd7930.c | |||
@@ -1075,7 +1075,7 @@ static struct of_platform_driver amd7930_sbus_driver = { | |||
1075 | 1075 | ||
1076 | static int __init amd7930_init(void) | 1076 | static int __init amd7930_init(void) |
1077 | { | 1077 | { |
1078 | return of_register_driver(&amd7930_sbus_driver, &of_bus_type); | 1078 | return of_register_platform_driver(&amd7930_sbus_driver); |
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | static void __exit amd7930_exit(void) | 1081 | static void __exit amd7930_exit(void) |
@@ -1092,7 +1092,7 @@ static void __exit amd7930_exit(void) | |||
1092 | 1092 | ||
1093 | amd7930_list = NULL; | 1093 | amd7930_list = NULL; |
1094 | 1094 | ||
1095 | of_unregister_driver(&amd7930_sbus_driver); | 1095 | of_unregister_platform_driver(&amd7930_sbus_driver); |
1096 | } | 1096 | } |
1097 | 1097 | ||
1098 | module_init(amd7930_init); | 1098 | module_init(amd7930_init); |
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index f7f05c246303..68570ee2c9bb 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c | |||
@@ -2120,12 +2120,12 @@ static struct of_platform_driver cs4231_driver = { | |||
2120 | 2120 | ||
2121 | static int __init cs4231_init(void) | 2121 | static int __init cs4231_init(void) |
2122 | { | 2122 | { |
2123 | return of_register_driver(&cs4231_driver, &of_bus_type); | 2123 | return of_register_platform_driver(&cs4231_driver); |
2124 | } | 2124 | } |
2125 | 2125 | ||
2126 | static void __exit cs4231_exit(void) | 2126 | static void __exit cs4231_exit(void) |
2127 | { | 2127 | { |
2128 | of_unregister_driver(&cs4231_driver); | 2128 | of_unregister_platform_driver(&cs4231_driver); |
2129 | } | 2129 | } |
2130 | 2130 | ||
2131 | module_init(cs4231_init); | 2131 | module_init(cs4231_init); |
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 491ce71c84b6..c421901c48d0 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c | |||
@@ -2699,12 +2699,12 @@ static struct of_platform_driver dbri_sbus_driver = { | |||
2699 | /* Probe for the dbri chip and then attach the driver. */ | 2699 | /* Probe for the dbri chip and then attach the driver. */ |
2700 | static int __init dbri_init(void) | 2700 | static int __init dbri_init(void) |
2701 | { | 2701 | { |
2702 | return of_register_driver(&dbri_sbus_driver, &of_bus_type); | 2702 | return of_register_platform_driver(&dbri_sbus_driver); |
2703 | } | 2703 | } |
2704 | 2704 | ||
2705 | static void __exit dbri_exit(void) | 2705 | static void __exit dbri_exit(void) |
2706 | { | 2706 | { |
2707 | of_unregister_driver(&dbri_sbus_driver); | 2707 | of_unregister_platform_driver(&dbri_sbus_driver); |
2708 | } | 2708 | } |
2709 | 2709 | ||
2710 | module_init(dbri_init); | 2710 | module_init(dbri_init); |