diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-06-24 17:14:37 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-24 11:57:52 -0400 |
commit | 1ab1d63a85cee2545272f63a7644e9f855cb65d0 (patch) | |
tree | 089afe8c03370cdfaf3eeb30d09e1bcac8a67898 /drivers | |
parent | eca3930163ba8884060ce9d9ff5ef0d9b7c7b00f (diff) |
of/platform: remove all of_bus_type and of_platform_bus_type references
Both of_bus_type and of_platform_bus_type are just #define aliases
for the platform bus. This patch removes all references to them and
switches to the of_register_platform_driver()/of_unregister_platform_driver()
API for registering.
Subsequent patches will convert each user of of_register_platform_driver()
into plain platform_drivers without the of_platform_driver shim. At which
point the of_register_platform_driver()/of_unregister_platform_driver()
functions can be removed.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
37 files changed, 82 insertions, 85 deletions
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); |