diff options
| -rw-r--r-- | drivers/video/efifb.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c index 8cb31e106b9e..69c49dfce9cf 100644 --- a/drivers/video/efifb.c +++ b/drivers/video/efifb.c | |||
| @@ -330,7 +330,7 @@ static int __init efifb_setup(char *options) | |||
| 330 | return 0; | 330 | return 0; |
| 331 | } | 331 | } |
| 332 | 332 | ||
| 333 | static int __devinit efifb_probe(struct platform_device *dev) | 333 | static int __init efifb_probe(struct platform_device *dev) |
| 334 | { | 334 | { |
| 335 | struct fb_info *info; | 335 | struct fb_info *info; |
| 336 | int err; | 336 | int err; |
| @@ -500,7 +500,6 @@ err_release_mem: | |||
| 500 | } | 500 | } |
| 501 | 501 | ||
| 502 | static struct platform_driver efifb_driver = { | 502 | static struct platform_driver efifb_driver = { |
| 503 | .probe = efifb_probe, | ||
| 504 | .driver = { | 503 | .driver = { |
| 505 | .name = "efifb", | 504 | .name = "efifb", |
| 506 | }, | 505 | }, |
| @@ -531,13 +530,21 @@ static int __init efifb_init(void) | |||
| 531 | if (!screen_info.lfb_linelength) | 530 | if (!screen_info.lfb_linelength) |
| 532 | return -ENODEV; | 531 | return -ENODEV; |
| 533 | 532 | ||
| 534 | ret = platform_driver_register(&efifb_driver); | 533 | ret = platform_device_register(&efifb_device); |
| 534 | if (ret) | ||
| 535 | return ret; | ||
| 535 | 536 | ||
| 536 | if (!ret) { | 537 | /* |
| 537 | ret = platform_device_register(&efifb_device); | 538 | * This is not just an optimization. We will interfere |
| 538 | if (ret) | 539 | * with a real driver if we get reprobed, so don't allow |
| 539 | platform_driver_unregister(&efifb_driver); | 540 | * it. |
| 541 | */ | ||
| 542 | ret = platform_driver_probe(&efifb_driver, efifb_probe); | ||
| 543 | if (ret) { | ||
| 544 | platform_device_unregister(&efifb_driver); | ||
| 545 | return ret; | ||
| 540 | } | 546 | } |
| 547 | |||
| 541 | return ret; | 548 | return ret; |
| 542 | } | 549 | } |
| 543 | module_init(efifb_init); | 550 | module_init(efifb_init); |
