diff options
Diffstat (limited to 'drivers/video/vfb.c')
-rw-r--r-- | drivers/video/vfb.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c index b137a3fe0752..ffa1ad474226 100644 --- a/drivers/video/vfb.c +++ b/drivers/video/vfb.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/vmalloc.h> | 20 | #include <linux/vmalloc.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/platform_device.h> | ||
24 | |||
23 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
24 | #include <linux/fb.h> | 26 | #include <linux/fb.h> |
25 | #include <linux/init.h> | 27 | #include <linux/init.h> |
@@ -90,7 +92,6 @@ static struct fb_ops vfb_ops = { | |||
90 | .fb_fillrect = cfb_fillrect, | 92 | .fb_fillrect = cfb_fillrect, |
91 | .fb_copyarea = cfb_copyarea, | 93 | .fb_copyarea = cfb_copyarea, |
92 | .fb_imageblit = cfb_imageblit, | 94 | .fb_imageblit = cfb_imageblit, |
93 | .fb_cursor = soft_cursor, | ||
94 | .fb_mmap = vfb_mmap, | 95 | .fb_mmap = vfb_mmap, |
95 | }; | 96 | }; |
96 | 97 | ||
@@ -402,9 +403,8 @@ static void vfb_platform_release(struct device *device) | |||
402 | // This is called when the reference count goes to zero. | 403 | // This is called when the reference count goes to zero. |
403 | } | 404 | } |
404 | 405 | ||
405 | static int __init vfb_probe(struct device *device) | 406 | static int __init vfb_probe(struct platform_device *dev) |
406 | { | 407 | { |
407 | struct platform_device *dev = to_platform_device(device); | ||
408 | struct fb_info *info; | 408 | struct fb_info *info; |
409 | int retval = -ENOMEM; | 409 | int retval = -ENOMEM; |
410 | 410 | ||
@@ -446,7 +446,7 @@ static int __init vfb_probe(struct device *device) | |||
446 | retval = register_framebuffer(info); | 446 | retval = register_framebuffer(info); |
447 | if (retval < 0) | 447 | if (retval < 0) |
448 | goto err2; | 448 | goto err2; |
449 | dev_set_drvdata(&dev->dev, info); | 449 | platform_set_drvdata(dev, info); |
450 | 450 | ||
451 | printk(KERN_INFO | 451 | printk(KERN_INFO |
452 | "fb%d: Virtual frame buffer device, using %ldK of video memory\n", | 452 | "fb%d: Virtual frame buffer device, using %ldK of video memory\n", |
@@ -461,9 +461,9 @@ err: | |||
461 | return retval; | 461 | return retval; |
462 | } | 462 | } |
463 | 463 | ||
464 | static int vfb_remove(struct device *device) | 464 | static int vfb_remove(struct platform_device *dev) |
465 | { | 465 | { |
466 | struct fb_info *info = dev_get_drvdata(device); | 466 | struct fb_info *info = platform_get_drvdata(dev); |
467 | 467 | ||
468 | if (info) { | 468 | if (info) { |
469 | unregister_framebuffer(info); | 469 | unregister_framebuffer(info); |
@@ -473,11 +473,12 @@ static int vfb_remove(struct device *device) | |||
473 | return 0; | 473 | return 0; |
474 | } | 474 | } |
475 | 475 | ||
476 | static struct device_driver vfb_driver = { | 476 | static struct platform_driver vfb_driver = { |
477 | .name = "vfb", | ||
478 | .bus = &platform_bus_type, | ||
479 | .probe = vfb_probe, | 477 | .probe = vfb_probe, |
480 | .remove = vfb_remove, | 478 | .remove = vfb_remove, |
479 | .driver = { | ||
480 | .name = "vfb", | ||
481 | }, | ||
481 | }; | 482 | }; |
482 | 483 | ||
483 | static struct platform_device vfb_device = { | 484 | static struct platform_device vfb_device = { |
@@ -503,12 +504,12 @@ static int __init vfb_init(void) | |||
503 | if (!vfb_enable) | 504 | if (!vfb_enable) |
504 | return -ENXIO; | 505 | return -ENXIO; |
505 | 506 | ||
506 | ret = driver_register(&vfb_driver); | 507 | ret = platform_driver_register(&vfb_driver); |
507 | 508 | ||
508 | if (!ret) { | 509 | if (!ret) { |
509 | ret = platform_device_register(&vfb_device); | 510 | ret = platform_device_register(&vfb_device); |
510 | if (ret) | 511 | if (ret) |
511 | driver_unregister(&vfb_driver); | 512 | platform_driver_unregister(&vfb_driver); |
512 | } | 513 | } |
513 | return ret; | 514 | return ret; |
514 | } | 515 | } |
@@ -519,7 +520,7 @@ module_init(vfb_init); | |||
519 | static void __exit vfb_exit(void) | 520 | static void __exit vfb_exit(void) |
520 | { | 521 | { |
521 | platform_device_unregister(&vfb_device); | 522 | platform_device_unregister(&vfb_device); |
522 | driver_unregister(&vfb_driver); | 523 | platform_driver_unregister(&vfb_driver); |
523 | } | 524 | } |
524 | 525 | ||
525 | module_exit(vfb_exit); | 526 | module_exit(vfb_exit); |