diff options
Diffstat (limited to 'drivers/video/vesafb.c')
-rw-r--r-- | drivers/video/vesafb.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c index e25eae1a78c1..3e58ddc2bc38 100644 --- a/drivers/video/vesafb.c +++ b/drivers/video/vesafb.c | |||
@@ -245,9 +245,8 @@ static int __init vesafb_setup(char *options) | |||
245 | return 0; | 245 | return 0; |
246 | } | 246 | } |
247 | 247 | ||
248 | static int __init vesafb_probe(struct device *device) | 248 | static int __init vesafb_probe(struct platform_device *dev) |
249 | { | 249 | { |
250 | struct platform_device *dev = to_platform_device(device); | ||
251 | struct fb_info *info; | 250 | struct fb_info *info; |
252 | int i, err; | 251 | int i, err; |
253 | unsigned int size_vmode; | 252 | unsigned int size_vmode; |
@@ -414,6 +413,7 @@ static int __init vesafb_probe(struct device *device) | |||
414 | * region already (FIXME) */ | 413 | * region already (FIXME) */ |
415 | request_region(0x3c0, 32, "vesafb"); | 414 | request_region(0x3c0, 32, "vesafb"); |
416 | 415 | ||
416 | #ifdef CONFIG_MTRR | ||
417 | if (mtrr) { | 417 | if (mtrr) { |
418 | unsigned int temp_size = size_total; | 418 | unsigned int temp_size = size_total; |
419 | unsigned int type = 0; | 419 | unsigned int type = 0; |
@@ -451,6 +451,7 @@ static int __init vesafb_probe(struct device *device) | |||
451 | } while (temp_size >= PAGE_SIZE && rc == -EINVAL); | 451 | } while (temp_size >= PAGE_SIZE && rc == -EINVAL); |
452 | } | 452 | } |
453 | } | 453 | } |
454 | #endif | ||
454 | 455 | ||
455 | info->fbops = &vesafb_ops; | 456 | info->fbops = &vesafb_ops; |
456 | info->var = vesafb_defined; | 457 | info->var = vesafb_defined; |
@@ -480,10 +481,11 @@ err: | |||
480 | return err; | 481 | return err; |
481 | } | 482 | } |
482 | 483 | ||
483 | static struct device_driver vesafb_driver = { | 484 | static struct platform_driver vesafb_driver = { |
484 | .name = "vesafb", | ||
485 | .bus = &platform_bus_type, | ||
486 | .probe = vesafb_probe, | 485 | .probe = vesafb_probe, |
486 | .driver = { | ||
487 | .name = "vesafb", | ||
488 | }, | ||
487 | }; | 489 | }; |
488 | 490 | ||
489 | static struct platform_device vesafb_device = { | 491 | static struct platform_device vesafb_device = { |
@@ -498,12 +500,12 @@ static int __init vesafb_init(void) | |||
498 | /* ignore error return of fb_get_options */ | 500 | /* ignore error return of fb_get_options */ |
499 | fb_get_options("vesafb", &option); | 501 | fb_get_options("vesafb", &option); |
500 | vesafb_setup(option); | 502 | vesafb_setup(option); |
501 | ret = driver_register(&vesafb_driver); | 503 | ret = platform_driver_register(&vesafb_driver); |
502 | 504 | ||
503 | if (!ret) { | 505 | if (!ret) { |
504 | ret = platform_device_register(&vesafb_device); | 506 | ret = platform_device_register(&vesafb_device); |
505 | if (ret) | 507 | if (ret) |
506 | driver_unregister(&vesafb_driver); | 508 | platform_driver_unregister(&vesafb_driver); |
507 | } | 509 | } |
508 | return ret; | 510 | return ret; |
509 | } | 511 | } |