diff options
Diffstat (limited to 'drivers/video/vesafb.c')
-rw-r--r-- | drivers/video/vesafb.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c index 54ac91dc070b..0cadf7aee27e 100644 --- a/drivers/video/vesafb.c +++ b/drivers/video/vesafb.c | |||
@@ -225,7 +225,7 @@ static int __init vesafb_setup(char *options) | |||
225 | return 0; | 225 | return 0; |
226 | } | 226 | } |
227 | 227 | ||
228 | static int __devinit vesafb_probe(struct platform_device *dev) | 228 | static int __init vesafb_probe(struct platform_device *dev) |
229 | { | 229 | { |
230 | struct fb_info *info; | 230 | struct fb_info *info; |
231 | int i, err; | 231 | int i, err; |
@@ -476,7 +476,6 @@ err: | |||
476 | } | 476 | } |
477 | 477 | ||
478 | static struct platform_driver vesafb_driver = { | 478 | static struct platform_driver vesafb_driver = { |
479 | .probe = vesafb_probe, | ||
480 | .driver = { | 479 | .driver = { |
481 | .name = "vesafb", | 480 | .name = "vesafb", |
482 | }, | 481 | }, |
@@ -492,20 +491,21 @@ static int __init vesafb_init(void) | |||
492 | /* ignore error return of fb_get_options */ | 491 | /* ignore error return of fb_get_options */ |
493 | fb_get_options("vesafb", &option); | 492 | fb_get_options("vesafb", &option); |
494 | vesafb_setup(option); | 493 | vesafb_setup(option); |
495 | ret = platform_driver_register(&vesafb_driver); | ||
496 | 494 | ||
497 | if (!ret) { | 495 | vesafb_device = platform_device_alloc("vesafb", 0); |
498 | vesafb_device = platform_device_alloc("vesafb", 0); | 496 | if (!vesafb_device) |
497 | return -ENOMEM; | ||
499 | 498 | ||
500 | if (vesafb_device) | 499 | ret = platform_device_add(vesafb_device); |
501 | ret = platform_device_add(vesafb_device); | 500 | if (!ret) { |
502 | else | 501 | ret = platform_driver_probe(&vesafb_driver, vesafb_probe); |
503 | ret = -ENOMEM; | 502 | if (ret) |
503 | platform_device_del(vesafb_device); | ||
504 | } | ||
504 | 505 | ||
505 | if (ret) { | 506 | if (ret) { |
506 | platform_device_put(vesafb_device); | 507 | platform_device_put(vesafb_device); |
507 | platform_driver_unregister(&vesafb_driver); | 508 | vesafb_device = NULL; |
508 | } | ||
509 | } | 509 | } |
510 | 510 | ||
511 | return ret; | 511 | return ret; |