diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-11 12:24:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-11 12:24:26 -0500 |
commit | 5643f000c1e10ab991182478b76550e1364c3570 (patch) | |
tree | 950b2f61a5dd742de1c668ba968a9c8a99f1eab6 /drivers/video/vfb.c | |
parent | 177294d19174cf92de22434bb1fc9a8ecdbbe658 (diff) | |
parent | 3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel
Diffstat (limited to 'drivers/video/vfb.c')
-rw-r--r-- | drivers/video/vfb.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c index 8794dc5d2466..ffa1ad474226 100644 --- a/drivers/video/vfb.c +++ b/drivers/video/vfb.c | |||
@@ -403,9 +403,8 @@ static void vfb_platform_release(struct device *device) | |||
403 | // This is called when the reference count goes to zero. | 403 | // This is called when the reference count goes to zero. |
404 | } | 404 | } |
405 | 405 | ||
406 | static int __init vfb_probe(struct device *device) | 406 | static int __init vfb_probe(struct platform_device *dev) |
407 | { | 407 | { |
408 | struct platform_device *dev = to_platform_device(device); | ||
409 | struct fb_info *info; | 408 | struct fb_info *info; |
410 | int retval = -ENOMEM; | 409 | int retval = -ENOMEM; |
411 | 410 | ||
@@ -447,7 +446,7 @@ static int __init vfb_probe(struct device *device) | |||
447 | retval = register_framebuffer(info); | 446 | retval = register_framebuffer(info); |
448 | if (retval < 0) | 447 | if (retval < 0) |
449 | goto err2; | 448 | goto err2; |
450 | dev_set_drvdata(&dev->dev, info); | 449 | platform_set_drvdata(dev, info); |
451 | 450 | ||
452 | printk(KERN_INFO | 451 | printk(KERN_INFO |
453 | "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", |
@@ -462,9 +461,9 @@ err: | |||
462 | return retval; | 461 | return retval; |
463 | } | 462 | } |
464 | 463 | ||
465 | static int vfb_remove(struct device *device) | 464 | static int vfb_remove(struct platform_device *dev) |
466 | { | 465 | { |
467 | struct fb_info *info = dev_get_drvdata(device); | 466 | struct fb_info *info = platform_get_drvdata(dev); |
468 | 467 | ||
469 | if (info) { | 468 | if (info) { |
470 | unregister_framebuffer(info); | 469 | unregister_framebuffer(info); |
@@ -474,11 +473,12 @@ static int vfb_remove(struct device *device) | |||
474 | return 0; | 473 | return 0; |
475 | } | 474 | } |
476 | 475 | ||
477 | static struct device_driver vfb_driver = { | 476 | static struct platform_driver vfb_driver = { |
478 | .name = "vfb", | ||
479 | .bus = &platform_bus_type, | ||
480 | .probe = vfb_probe, | 477 | .probe = vfb_probe, |
481 | .remove = vfb_remove, | 478 | .remove = vfb_remove, |
479 | .driver = { | ||
480 | .name = "vfb", | ||
481 | }, | ||
482 | }; | 482 | }; |
483 | 483 | ||
484 | static struct platform_device vfb_device = { | 484 | static struct platform_device vfb_device = { |
@@ -504,12 +504,12 @@ static int __init vfb_init(void) | |||
504 | if (!vfb_enable) | 504 | if (!vfb_enable) |
505 | return -ENXIO; | 505 | return -ENXIO; |
506 | 506 | ||
507 | ret = driver_register(&vfb_driver); | 507 | ret = platform_driver_register(&vfb_driver); |
508 | 508 | ||
509 | if (!ret) { | 509 | if (!ret) { |
510 | ret = platform_device_register(&vfb_device); | 510 | ret = platform_device_register(&vfb_device); |
511 | if (ret) | 511 | if (ret) |
512 | driver_unregister(&vfb_driver); | 512 | platform_driver_unregister(&vfb_driver); |
513 | } | 513 | } |
514 | return ret; | 514 | return ret; |
515 | } | 515 | } |
@@ -520,7 +520,7 @@ module_init(vfb_init); | |||
520 | static void __exit vfb_exit(void) | 520 | static void __exit vfb_exit(void) |
521 | { | 521 | { |
522 | platform_device_unregister(&vfb_device); | 522 | platform_device_unregister(&vfb_device); |
523 | driver_unregister(&vfb_driver); | 523 | platform_driver_unregister(&vfb_driver); |
524 | } | 524 | } |
525 | 525 | ||
526 | module_exit(vfb_exit); | 526 | module_exit(vfb_exit); |