aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/epson1355fb.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-11-09 17:32:44 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-11-09 17:32:44 -0500
commit3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (patch)
treed8825be54cefb6ad6707478d719c8e30605bee7b /drivers/video/epson1355fb.c
parent00d3dcdd96646be6059cc21f2efa94c4edc1eda5 (diff)
[DRIVER MODEL] Convert platform drivers to use struct platform_driver
This allows us to eliminate the casts in the drivers, and eventually remove the use of the device_driver function pointer methods for platform device drivers. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/video/epson1355fb.c')
-rw-r--r--drivers/video/epson1355fb.c24
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
612static int epson1355fb_remove(struct device *device) 612static 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
635int __init epson1355fb_probe(struct device *device) 635int __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
728static struct device_driver epson1355fb_driver = { 727static 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
735static struct platform_device epson1355fb_device = { 735static 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);
762static void __exit epson1355fb_exit(void) 762static 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/* ------------------------------------------------------------------------- */