aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/epson1355fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/epson1355fb.c')
-rw-r--r--drivers/video/epson1355fb.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c
index 082759447bf6..f0a621ecc288 100644
--- a/drivers/video/epson1355fb.c
+++ b/drivers/video/epson1355fb.c
@@ -605,11 +605,6 @@ static void clearfb16(struct fb_info *info)
605 fb_writeb(0, dst); 605 fb_writeb(0, dst);
606} 606}
607 607
608static void epson1355fb_platform_release(struct device *device)
609{
610 dev_err(device, "This driver is broken, please bug the authors so they will fix it.\n");
611}
612
613static int epson1355fb_remove(struct platform_device *dev) 608static int epson1355fb_remove(struct platform_device *dev)
614{ 609{
615 struct fb_info *info = platform_get_drvdata(dev); 610 struct fb_info *info = platform_get_drvdata(dev);
@@ -733,13 +728,7 @@ static struct platform_driver epson1355fb_driver = {
733 }, 728 },
734}; 729};
735 730
736static struct platform_device epson1355fb_device = { 731static struct platform_device *epson1355fb_device;
737 .name = "epson1355fb",
738 .id = 0,
739 .dev = {
740 .release = epson1355fb_platform_release,
741 }
742};
743 732
744int __init epson1355fb_init(void) 733int __init epson1355fb_init(void)
745{ 734{
@@ -749,11 +738,21 @@ int __init epson1355fb_init(void)
749 return -ENODEV; 738 return -ENODEV;
750 739
751 ret = platform_driver_register(&epson1355fb_driver); 740 ret = platform_driver_register(&epson1355fb_driver);
741
752 if (!ret) { 742 if (!ret) {
753 ret = platform_device_register(&epson1355fb_device); 743 epson1355fb_device = platform_device_alloc("epson1355fb", 0);
754 if (ret) 744
745 if (epson1355fb_device)
746 ret = platform_device_add(epson1355fb_device);
747 else
748 ret = -ENOMEM;
749
750 if (ret) {
751 platform_device_put(epson1355fb_device);
755 platform_driver_unregister(&epson1355fb_driver); 752 platform_driver_unregister(&epson1355fb_driver);
753 }
756 } 754 }
755
757 return ret; 756 return ret;
758} 757}
759 758
@@ -762,7 +761,7 @@ module_init(epson1355fb_init);
762#ifdef MODULE 761#ifdef MODULE
763static void __exit epson1355fb_exit(void) 762static void __exit epson1355fb_exit(void)
764{ 763{
765 platform_device_unregister(&epson1355fb_device); 764 platform_device_unregister(epson1355fb_device);
766 platform_driver_unregister(&epson1355fb_driver); 765 platform_driver_unregister(&epson1355fb_driver);
767} 766}
768 767