summaryrefslogtreecommitdiff
path: root/drivers/video/omap/omapfb_main.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2009-12-16 13:18:07 +0200
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-01-11 13:33:09 +0200
commitf778a12dd33200513596a0d4d3ba4d5f09e79c09 (patch)
tree91fbb2cb9e9031fc41e4e649a1a72cec154cb432 /drivers/video/omap/omapfb_main.c
parentfc248a497d83f5aba9d46d7ff114c070fb2a2fa2 (diff)
OMAP: OMAPFB: fix clk_get for RFBI
omapfb platform device was still used to get clocks inside rfbi.c Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com> Tested-by: Sergey Lapin <slapin@ossfans.org>
Diffstat (limited to 'drivers/video/omap/omapfb_main.c')
-rw-r--r--drivers/video/omap/omapfb_main.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index c7f59a5ccdbc..f74aec91aee0 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -83,6 +83,12 @@ static struct caps_table_struct color_caps[] = {
{ 1 << OMAPFB_COLOR_YUY422, "YUY422", },
};
+/* dummy device for clocks */
+static struct platform_device omapdss_device = {
+ .name = "omapdss",
+ .id = -1,
+};
+
/*
* ---------------------------------------------------------------------------
* LCD panel
@@ -1700,6 +1706,7 @@ static int omapfb_do_probe(struct platform_device *pdev,
fbdev->dev = &pdev->dev;
fbdev->panel = panel;
+ fbdev->dssdev = &omapdss_device;
platform_set_drvdata(pdev, fbdev);
mutex_init(&fbdev->rqueue_mutex);
@@ -1814,8 +1821,16 @@ cleanup:
static int omapfb_probe(struct platform_device *pdev)
{
+ int r;
+
BUG_ON(fbdev_pdev != NULL);
+ r = platform_device_register(&omapdss_device);
+ if (r) {
+ dev_err(&pdev->dev, "can't register omapdss device\n");
+ return r;
+ }
+
/* Delay actual initialization until the LCD is registered */
fbdev_pdev = pdev;
if (fbdev_panel != NULL)
@@ -1843,6 +1858,9 @@ static int omapfb_remove(struct platform_device *pdev)
fbdev->state = OMAPFB_DISABLED;
omapfb_free_resources(fbdev, saved_state);
+ platform_device_unregister(&omapdss_device);
+ fbdev->dssdev = NULL;
+
return 0;
}