diff options
Diffstat (limited to 'drivers/video/omap/omapfb_main.c')
-rw-r--r-- | drivers/video/omap/omapfb_main.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c index c7f59a5ccdbc..2c4f470fa086 100644 --- a/drivers/video/omap/omapfb_main.c +++ b/drivers/video/omap/omapfb_main.c | |||
@@ -83,6 +83,19 @@ static struct caps_table_struct color_caps[] = { | |||
83 | { 1 << OMAPFB_COLOR_YUY422, "YUY422", }, | 83 | { 1 << OMAPFB_COLOR_YUY422, "YUY422", }, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static void omapdss_release(struct device *dev) | ||
87 | { | ||
88 | } | ||
89 | |||
90 | /* dummy device for clocks */ | ||
91 | static struct platform_device omapdss_device = { | ||
92 | .name = "omapdss", | ||
93 | .id = -1, | ||
94 | .dev = { | ||
95 | .release = omapdss_release, | ||
96 | }, | ||
97 | }; | ||
98 | |||
86 | /* | 99 | /* |
87 | * --------------------------------------------------------------------------- | 100 | * --------------------------------------------------------------------------- |
88 | * LCD panel | 101 | * LCD panel |
@@ -1700,6 +1713,7 @@ static int omapfb_do_probe(struct platform_device *pdev, | |||
1700 | 1713 | ||
1701 | fbdev->dev = &pdev->dev; | 1714 | fbdev->dev = &pdev->dev; |
1702 | fbdev->panel = panel; | 1715 | fbdev->panel = panel; |
1716 | fbdev->dssdev = &omapdss_device; | ||
1703 | platform_set_drvdata(pdev, fbdev); | 1717 | platform_set_drvdata(pdev, fbdev); |
1704 | 1718 | ||
1705 | mutex_init(&fbdev->rqueue_mutex); | 1719 | mutex_init(&fbdev->rqueue_mutex); |
@@ -1814,8 +1828,16 @@ cleanup: | |||
1814 | 1828 | ||
1815 | static int omapfb_probe(struct platform_device *pdev) | 1829 | static int omapfb_probe(struct platform_device *pdev) |
1816 | { | 1830 | { |
1831 | int r; | ||
1832 | |||
1817 | BUG_ON(fbdev_pdev != NULL); | 1833 | BUG_ON(fbdev_pdev != NULL); |
1818 | 1834 | ||
1835 | r = platform_device_register(&omapdss_device); | ||
1836 | if (r) { | ||
1837 | dev_err(&pdev->dev, "can't register omapdss device\n"); | ||
1838 | return r; | ||
1839 | } | ||
1840 | |||
1819 | /* Delay actual initialization until the LCD is registered */ | 1841 | /* Delay actual initialization until the LCD is registered */ |
1820 | fbdev_pdev = pdev; | 1842 | fbdev_pdev = pdev; |
1821 | if (fbdev_panel != NULL) | 1843 | if (fbdev_panel != NULL) |
@@ -1843,6 +1865,9 @@ static int omapfb_remove(struct platform_device *pdev) | |||
1843 | fbdev->state = OMAPFB_DISABLED; | 1865 | fbdev->state = OMAPFB_DISABLED; |
1844 | omapfb_free_resources(fbdev, saved_state); | 1866 | omapfb_free_resources(fbdev, saved_state); |
1845 | 1867 | ||
1868 | platform_device_unregister(&omapdss_device); | ||
1869 | fbdev->dssdev = NULL; | ||
1870 | |||
1846 | return 0; | 1871 | return 0; |
1847 | } | 1872 | } |
1848 | 1873 | ||