diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/video/vesafb.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/video/vesafb.c')
-rw-r--r-- | drivers/video/vesafb.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c index bd37ee1f6a25..0cadf7aee27e 100644 --- a/drivers/video/vesafb.c +++ b/drivers/video/vesafb.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
18 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
19 | #include <linux/ioport.h> | 18 | #include <linux/ioport.h> |
@@ -477,7 +476,6 @@ err: | |||
477 | } | 476 | } |
478 | 477 | ||
479 | static struct platform_driver vesafb_driver = { | 478 | static struct platform_driver vesafb_driver = { |
480 | .probe = vesafb_probe, | ||
481 | .driver = { | 479 | .driver = { |
482 | .name = "vesafb", | 480 | .name = "vesafb", |
483 | }, | 481 | }, |
@@ -493,20 +491,21 @@ static int __init vesafb_init(void) | |||
493 | /* ignore error return of fb_get_options */ | 491 | /* ignore error return of fb_get_options */ |
494 | fb_get_options("vesafb", &option); | 492 | fb_get_options("vesafb", &option); |
495 | vesafb_setup(option); | 493 | vesafb_setup(option); |
496 | ret = platform_driver_register(&vesafb_driver); | ||
497 | 494 | ||
498 | if (!ret) { | 495 | vesafb_device = platform_device_alloc("vesafb", 0); |
499 | vesafb_device = platform_device_alloc("vesafb", 0); | 496 | if (!vesafb_device) |
497 | return -ENOMEM; | ||
500 | 498 | ||
501 | if (vesafb_device) | 499 | ret = platform_device_add(vesafb_device); |
502 | ret = platform_device_add(vesafb_device); | 500 | if (!ret) { |
503 | else | 501 | ret = platform_driver_probe(&vesafb_driver, vesafb_probe); |
504 | ret = -ENOMEM; | 502 | if (ret) |
503 | platform_device_del(vesafb_device); | ||
504 | } | ||
505 | 505 | ||
506 | if (ret) { | 506 | if (ret) { |
507 | platform_device_put(vesafb_device); | 507 | platform_device_put(vesafb_device); |
508 | platform_driver_unregister(&vesafb_driver); | 508 | vesafb_device = NULL; |
509 | } | ||
510 | } | 509 | } |
511 | 510 | ||
512 | return ret; | 511 | return ret; |