diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-02-22 22:01:33 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-02-28 03:36:39 -0500 |
commit | 4ebb24f707187196937607c60810d42f7112d7aa (patch) | |
tree | 89a92b3f8dd55f3c5e0cfa73fa6446b3d490f3a8 /drivers/sbus | |
parent | 000061245a6797d542854106463b6b20fbdcb12e (diff) |
dt/sparc: Eliminate users of of_platform_{,un}register_driver
Get rid of old users of of_platform_driver in arch/sparc. Most
of_platform_driver users can be converted to use the platform_bus
directly.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/sbus')
-rw-r--r-- | drivers/sbus/char/bbc_i2c.c | 9 | ||||
-rw-r--r-- | drivers/sbus/char/display7seg.c | 9 | ||||
-rw-r--r-- | drivers/sbus/char/envctrl.c | 9 | ||||
-rw-r--r-- | drivers/sbus/char/flash.c | 9 | ||||
-rw-r--r-- | drivers/sbus/char/uctrl.c | 9 |
5 files changed, 20 insertions, 25 deletions
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 614a5e114a19..5f94d22c491e 100644 --- a/drivers/sbus/char/bbc_i2c.c +++ b/drivers/sbus/char/bbc_i2c.c | |||
@@ -361,8 +361,7 @@ fail: | |||
361 | extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); | 361 | extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); |
362 | extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); | 362 | extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); |
363 | 363 | ||
364 | static int __devinit bbc_i2c_probe(struct platform_device *op, | 364 | static int __devinit bbc_i2c_probe(struct platform_device *op) |
365 | const struct of_device_id *match) | ||
366 | { | 365 | { |
367 | struct bbc_i2c_bus *bp; | 366 | struct bbc_i2c_bus *bp; |
368 | int err, index = 0; | 367 | int err, index = 0; |
@@ -413,7 +412,7 @@ static const struct of_device_id bbc_i2c_match[] = { | |||
413 | }; | 412 | }; |
414 | MODULE_DEVICE_TABLE(of, bbc_i2c_match); | 413 | MODULE_DEVICE_TABLE(of, bbc_i2c_match); |
415 | 414 | ||
416 | static struct of_platform_driver bbc_i2c_driver = { | 415 | static struct platform_driver bbc_i2c_driver = { |
417 | .driver = { | 416 | .driver = { |
418 | .name = "bbc_i2c", | 417 | .name = "bbc_i2c", |
419 | .owner = THIS_MODULE, | 418 | .owner = THIS_MODULE, |
@@ -425,12 +424,12 @@ static struct of_platform_driver bbc_i2c_driver = { | |||
425 | 424 | ||
426 | static int __init bbc_i2c_init(void) | 425 | static int __init bbc_i2c_init(void) |
427 | { | 426 | { |
428 | return of_register_platform_driver(&bbc_i2c_driver); | 427 | return platform_driver_register(&bbc_i2c_driver); |
429 | } | 428 | } |
430 | 429 | ||
431 | static void __exit bbc_i2c_exit(void) | 430 | static void __exit bbc_i2c_exit(void) |
432 | { | 431 | { |
433 | of_unregister_platform_driver(&bbc_i2c_driver); | 432 | platform_driver_unregister(&bbc_i2c_driver); |
434 | } | 433 | } |
435 | 434 | ||
436 | module_init(bbc_i2c_init); | 435 | module_init(bbc_i2c_init); |
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index 55f71ea9c418..740da4465447 100644 --- a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c | |||
@@ -171,8 +171,7 @@ static struct miscdevice d7s_miscdev = { | |||
171 | .fops = &d7s_fops | 171 | .fops = &d7s_fops |
172 | }; | 172 | }; |
173 | 173 | ||
174 | static int __devinit d7s_probe(struct platform_device *op, | 174 | static int __devinit d7s_probe(struct platform_device *op) |
175 | const struct of_device_id *match) | ||
176 | { | 175 | { |
177 | struct device_node *opts; | 176 | struct device_node *opts; |
178 | int err = -EINVAL; | 177 | int err = -EINVAL; |
@@ -266,7 +265,7 @@ static const struct of_device_id d7s_match[] = { | |||
266 | }; | 265 | }; |
267 | MODULE_DEVICE_TABLE(of, d7s_match); | 266 | MODULE_DEVICE_TABLE(of, d7s_match); |
268 | 267 | ||
269 | static struct of_platform_driver d7s_driver = { | 268 | static struct platform_driver d7s_driver = { |
270 | .driver = { | 269 | .driver = { |
271 | .name = DRIVER_NAME, | 270 | .name = DRIVER_NAME, |
272 | .owner = THIS_MODULE, | 271 | .owner = THIS_MODULE, |
@@ -278,12 +277,12 @@ static struct of_platform_driver d7s_driver = { | |||
278 | 277 | ||
279 | static int __init d7s_init(void) | 278 | static int __init d7s_init(void) |
280 | { | 279 | { |
281 | return of_register_platform_driver(&d7s_driver); | 280 | return platform_driver_register(&d7s_driver); |
282 | } | 281 | } |
283 | 282 | ||
284 | static void __exit d7s_exit(void) | 283 | static void __exit d7s_exit(void) |
285 | { | 284 | { |
286 | of_unregister_platform_driver(&d7s_driver); | 285 | platform_driver_unregister(&d7s_driver); |
287 | } | 286 | } |
288 | 287 | ||
289 | module_init(d7s_init); | 288 | module_init(d7s_init); |
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index 8ce414e39489..be7b4e56154f 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
@@ -1028,8 +1028,7 @@ static int kenvctrld(void *__unused) | |||
1028 | return 0; | 1028 | return 0; |
1029 | } | 1029 | } |
1030 | 1030 | ||
1031 | static int __devinit envctrl_probe(struct platform_device *op, | 1031 | static int __devinit envctrl_probe(struct platform_device *op) |
1032 | const struct of_device_id *match) | ||
1033 | { | 1032 | { |
1034 | struct device_node *dp; | 1033 | struct device_node *dp; |
1035 | int index, err; | 1034 | int index, err; |
@@ -1129,7 +1128,7 @@ static const struct of_device_id envctrl_match[] = { | |||
1129 | }; | 1128 | }; |
1130 | MODULE_DEVICE_TABLE(of, envctrl_match); | 1129 | MODULE_DEVICE_TABLE(of, envctrl_match); |
1131 | 1130 | ||
1132 | static struct of_platform_driver envctrl_driver = { | 1131 | static struct platform_driver envctrl_driver = { |
1133 | .driver = { | 1132 | .driver = { |
1134 | .name = DRIVER_NAME, | 1133 | .name = DRIVER_NAME, |
1135 | .owner = THIS_MODULE, | 1134 | .owner = THIS_MODULE, |
@@ -1141,12 +1140,12 @@ static struct of_platform_driver envctrl_driver = { | |||
1141 | 1140 | ||
1142 | static int __init envctrl_init(void) | 1141 | static int __init envctrl_init(void) |
1143 | { | 1142 | { |
1144 | return of_register_platform_driver(&envctrl_driver); | 1143 | return platform_driver_register(&envctrl_driver); |
1145 | } | 1144 | } |
1146 | 1145 | ||
1147 | static void __exit envctrl_exit(void) | 1146 | static void __exit envctrl_exit(void) |
1148 | { | 1147 | { |
1149 | of_unregister_platform_driver(&envctrl_driver); | 1148 | platform_driver_unregister(&envctrl_driver); |
1150 | } | 1149 | } |
1151 | 1150 | ||
1152 | module_init(envctrl_init); | 1151 | module_init(envctrl_init); |
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 2b4b4b613c48..73dd4e7afaaa 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c | |||
@@ -160,8 +160,7 @@ static const struct file_operations flash_fops = { | |||
160 | 160 | ||
161 | static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; | 161 | static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; |
162 | 162 | ||
163 | static int __devinit flash_probe(struct platform_device *op, | 163 | static int __devinit flash_probe(struct platform_device *op) |
164 | const struct of_device_id *match) | ||
165 | { | 164 | { |
166 | struct device_node *dp = op->dev.of_node; | 165 | struct device_node *dp = op->dev.of_node; |
167 | struct device_node *parent; | 166 | struct device_node *parent; |
@@ -207,7 +206,7 @@ static const struct of_device_id flash_match[] = { | |||
207 | }; | 206 | }; |
208 | MODULE_DEVICE_TABLE(of, flash_match); | 207 | MODULE_DEVICE_TABLE(of, flash_match); |
209 | 208 | ||
210 | static struct of_platform_driver flash_driver = { | 209 | static struct platform_driver flash_driver = { |
211 | .driver = { | 210 | .driver = { |
212 | .name = "flash", | 211 | .name = "flash", |
213 | .owner = THIS_MODULE, | 212 | .owner = THIS_MODULE, |
@@ -219,12 +218,12 @@ static struct of_platform_driver flash_driver = { | |||
219 | 218 | ||
220 | static int __init flash_init(void) | 219 | static int __init flash_init(void) |
221 | { | 220 | { |
222 | return of_register_platform_driver(&flash_driver); | 221 | return platform_driver_register(&flash_driver); |
223 | } | 222 | } |
224 | 223 | ||
225 | static void __exit flash_cleanup(void) | 224 | static void __exit flash_cleanup(void) |
226 | { | 225 | { |
227 | of_unregister_platform_driver(&flash_driver); | 226 | platform_driver_unregister(&flash_driver); |
228 | } | 227 | } |
229 | 228 | ||
230 | module_init(flash_init); | 229 | module_init(flash_init); |
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index 1b345be5cc02..ebce9639a26a 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c | |||
@@ -348,8 +348,7 @@ static void uctrl_get_external_status(struct uctrl_driver *driver) | |||
348 | 348 | ||
349 | } | 349 | } |
350 | 350 | ||
351 | static int __devinit uctrl_probe(struct platform_device *op, | 351 | static int __devinit uctrl_probe(struct platform_device *op) |
352 | const struct of_device_id *match) | ||
353 | { | 352 | { |
354 | struct uctrl_driver *p; | 353 | struct uctrl_driver *p; |
355 | int err = -ENOMEM; | 354 | int err = -ENOMEM; |
@@ -425,7 +424,7 @@ static const struct of_device_id uctrl_match[] = { | |||
425 | }; | 424 | }; |
426 | MODULE_DEVICE_TABLE(of, uctrl_match); | 425 | MODULE_DEVICE_TABLE(of, uctrl_match); |
427 | 426 | ||
428 | static struct of_platform_driver uctrl_driver = { | 427 | static struct platform_driver uctrl_driver = { |
429 | .driver = { | 428 | .driver = { |
430 | .name = "uctrl", | 429 | .name = "uctrl", |
431 | .owner = THIS_MODULE, | 430 | .owner = THIS_MODULE, |
@@ -438,12 +437,12 @@ static struct of_platform_driver uctrl_driver = { | |||
438 | 437 | ||
439 | static int __init uctrl_init(void) | 438 | static int __init uctrl_init(void) |
440 | { | 439 | { |
441 | return of_register_platform_driver(&uctrl_driver); | 440 | return platform_driver_register(&uctrl_driver); |
442 | } | 441 | } |
443 | 442 | ||
444 | static void __exit uctrl_exit(void) | 443 | static void __exit uctrl_exit(void) |
445 | { | 444 | { |
446 | of_unregister_platform_driver(&uctrl_driver); | 445 | platform_driver_unregister(&uctrl_driver); |
447 | } | 446 | } |
448 | 447 | ||
449 | module_init(uctrl_init); | 448 | module_init(uctrl_init); |