diff options
Diffstat (limited to 'drivers/video/epson1355fb.c')
-rw-r--r-- | drivers/video/epson1355fb.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c index 6a81a1dd8f3d..3b0e71383448 100644 --- a/drivers/video/epson1355fb.c +++ b/drivers/video/epson1355fb.c | |||
@@ -609,9 +609,9 @@ static void epson1355fb_platform_release(struct device *device) | |||
609 | { | 609 | { |
610 | } | 610 | } |
611 | 611 | ||
612 | static int epson1355fb_remove(struct device *device) | 612 | static int epson1355fb_remove(struct platform_device *dev) |
613 | { | 613 | { |
614 | struct fb_info *info = dev_get_drvdata(device); | 614 | struct fb_info *info = platform_get_drvdata(dev); |
615 | struct epson1355_par *par = info->par; | 615 | struct epson1355_par *par = info->par; |
616 | 616 | ||
617 | backlight_enable(0); | 617 | backlight_enable(0); |
@@ -632,9 +632,8 @@ static int epson1355fb_remove(struct device *device) | |||
632 | return 0; | 632 | return 0; |
633 | } | 633 | } |
634 | 634 | ||
635 | int __init epson1355fb_probe(struct device *device) | 635 | int __init epson1355fb_probe(struct platform_device *dev) |
636 | { | 636 | { |
637 | struct platform_device *dev = to_platform_device(device); | ||
638 | struct epson1355_par *default_par; | 637 | struct epson1355_par *default_par; |
639 | struct fb_info *info; | 638 | struct fb_info *info; |
640 | u8 revision; | 639 | u8 revision; |
@@ -713,7 +712,7 @@ int __init epson1355fb_probe(struct device *device) | |||
713 | /* | 712 | /* |
714 | * Our driver data. | 713 | * Our driver data. |
715 | */ | 714 | */ |
716 | dev_set_drvdata(&dev->dev, info); | 715 | platform_set_drvdata(dev, info); |
717 | 716 | ||
718 | printk(KERN_INFO "fb%d: %s frame buffer device\n", | 717 | printk(KERN_INFO "fb%d: %s frame buffer device\n", |
719 | info->node, info->fix.id); | 718 | info->node, info->fix.id); |
@@ -721,15 +720,16 @@ int __init epson1355fb_probe(struct device *device) | |||
721 | return 0; | 720 | return 0; |
722 | 721 | ||
723 | bail: | 722 | bail: |
724 | epson1355fb_remove(device); | 723 | epson1355fb_remove(dev); |
725 | return rc; | 724 | return rc; |
726 | } | 725 | } |
727 | 726 | ||
728 | static struct device_driver epson1355fb_driver = { | 727 | static struct platform_driver epson1355fb_driver = { |
729 | .name = "epson1355fb", | ||
730 | .bus = &platform_bus_type, | ||
731 | .probe = epson1355fb_probe, | 728 | .probe = epson1355fb_probe, |
732 | .remove = epson1355fb_remove, | 729 | .remove = epson1355fb_remove, |
730 | .driver = { | ||
731 | .name = "epson1355fb", | ||
732 | }, | ||
733 | }; | 733 | }; |
734 | 734 | ||
735 | static struct platform_device epson1355fb_device = { | 735 | static struct platform_device epson1355fb_device = { |
@@ -747,11 +747,11 @@ int __init epson1355fb_init(void) | |||
747 | if (fb_get_options("epson1355fb", NULL)) | 747 | if (fb_get_options("epson1355fb", NULL)) |
748 | return -ENODEV; | 748 | return -ENODEV; |
749 | 749 | ||
750 | ret = driver_register(&epson1355fb_driver); | 750 | ret = platform_driver_register(&epson1355fb_driver); |
751 | if (!ret) { | 751 | if (!ret) { |
752 | ret = platform_device_register(&epson1355fb_device); | 752 | ret = platform_device_register(&epson1355fb_device); |
753 | if (ret) | 753 | if (ret) |
754 | driver_unregister(&epson1355fb_driver); | 754 | platform_driver_unregister(&epson1355fb_driver); |
755 | } | 755 | } |
756 | return ret; | 756 | return ret; |
757 | } | 757 | } |
@@ -762,7 +762,7 @@ module_init(epson1355fb_init); | |||
762 | static void __exit epson1355fb_exit(void) | 762 | static void __exit epson1355fb_exit(void) |
763 | { | 763 | { |
764 | platform_device_unregister(&epson1355fb_device); | 764 | platform_device_unregister(&epson1355fb_device); |
765 | driver_unregister(&epson1355fb_driver); | 765 | platform_driver_unregister(&epson1355fb_driver); |
766 | } | 766 | } |
767 | 767 | ||
768 | /* ------------------------------------------------------------------------- */ | 768 | /* ------------------------------------------------------------------------- */ |