Index: linux-2.6.35/drivers/video/omap/dispc.c =================================================================== --- linux-2.6.35.orig/drivers/video/omap/dispc.c 2010-08-08 12:56:09.000000000 +0200 +++ linux-2.6.35/drivers/video/omap/dispc.c 2010-08-08 12:57:42.000000000 +0200 @@ -190,6 +190,11 @@ static struct { struct omapfb_color_key color_key; } dispc; +struct platform_device omapdss_device = { + .name = "omapdss", + .id = -1, +}; + static void enable_lcd_clocks(int enable); static void inline dispc_write_reg(int idx, u32 val) @@ -916,20 +921,20 @@ static irqreturn_t omap_dispc_irq_handle static int get_dss_clocks(void) { - dispc.dss_ick = clk_get(&dispc.fbdev->dssdev->dev, "ick"); + dispc.dss_ick = clk_get(&omapdss_device.dev, "ick"); if (IS_ERR(dispc.dss_ick)) { dev_err(dispc.fbdev->dev, "can't get ick\n"); return PTR_ERR(dispc.dss_ick); } - dispc.dss1_fck = clk_get(&dispc.fbdev->dssdev->dev, "dss1_fck"); + dispc.dss1_fck = clk_get(&omapdss_device.dev, "dss1_fck"); if (IS_ERR(dispc.dss1_fck)) { dev_err(dispc.fbdev->dev, "can't get dss1_fck\n"); clk_put(dispc.dss_ick); return PTR_ERR(dispc.dss1_fck); } - dispc.dss_54m_fck = clk_get(&dispc.fbdev->dssdev->dev, "tv_fck"); + dispc.dss_54m_fck = clk_get(&omapdss_device.dev, "tv_fck"); if (IS_ERR(dispc.dss_54m_fck)) { dev_err(dispc.fbdev->dev, "can't get tv_fck\n"); clk_put(dispc.dss_ick); @@ -1381,6 +1386,12 @@ static int omap_dispc_init(struct omapfb int skip_init = 0; int i; + r = platform_device_register(&omapdss_device); + if (r) { + dev_err(fbdev->dev, "can't register omapdss device\n"); + return r; + } + memset(&dispc, 0, sizeof(dispc)); dispc.base = ioremap(DISPC_BASE, SZ_1K); @@ -1524,6 +1535,7 @@ static void omap_dispc_cleanup(void) free_irq(INT_24XX_DSS_IRQ, dispc.fbdev); put_dss_clocks(); iounmap(dispc.base); + platform_device_unregister(&omapdss_device); } const struct lcd_ctrl omap2_int_ctrl = { Index: linux-2.6.35/drivers/video/omap/lcd_htcherald.c =================================================================== --- linux-2.6.35.orig/drivers/video/omap/lcd_htcherald.c 2010-08-08 12:56:09.000000000 +0200 +++ linux-2.6.35/drivers/video/omap/lcd_htcherald.c 2010-08-08 12:57:43.000000000 +0200 @@ -115,12 +115,12 @@ struct platform_driver htcherald_panel_d }, }; -static int __init htcherald_panel_drv_init(void) +static int htcherald_panel_drv_init(void) { return platform_driver_register(&htcherald_panel_driver); } -static void __exit htcherald_panel_drv_cleanup(void) +static void htcherald_panel_drv_cleanup(void) { platform_driver_unregister(&htcherald_panel_driver); } Index: linux-2.6.35/drivers/video/omap/lcd_mipid.c =================================================================== --- linux-2.6.35.orig/drivers/video/omap/lcd_mipid.c 2010-08-08 12:56:09.000000000 +0200 +++ linux-2.6.35/drivers/video/omap/lcd_mipid.c 2010-08-08 12:57:44.000000000 +0200 @@ -551,9 +551,9 @@ static int mipid_detect(struct mipid_dev md->esd_check = ls041y3_esd_check; break; default: - md->panel.name = "unknown"; - dev_err(&md->spi->dev, "invalid display ID\n"); - return -ENODEV; + dev_err(&md->spi->dev, "FIXME: LCD panel detection failed! ID: %02x%02x%02x\n", display_id[0], display_id[1], display_id[2]); + md->panel.name = "ls041y3"; + md->esd_check = ls041y3_esd_check; } md->revision = display_id[1]; Index: linux-2.6.35/drivers/video/omap/omapfb.h =================================================================== --- linux-2.6.35.orig/drivers/video/omap/omapfb.h 2010-08-08 12:56:09.000000000 +0200 +++ linux-2.6.35/drivers/video/omap/omapfb.h 2010-08-08 12:57:45.000000000 +0200 @@ -203,8 +203,6 @@ struct omapfb_device { struct omapfb_mem_desc mem_desc; struct fb_info *fb_info[OMAPFB_PLANE_NUM]; - - struct platform_device *dssdev; /* dummy dev for clocks */ }; #ifdef CONFIG_ARCH_OMAP1 @@ -226,4 +224,6 @@ extern int omapfb_update_window_async(s void (*callback)(void *), void *callback_data); +extern struct platform_device omapdss_device; + #endif /* __OMAPFB_H */ Index: linux-2.6.35/drivers/video/omap/omapfb_main.c =================================================================== --- linux-2.6.35.orig/drivers/video/omap/omapfb_main.c 2010-08-08 12:56:09.000000000 +0200 +++ linux-2.6.35/drivers/video/omap/omapfb_main.c 2010-08-08 12:57:46.000000000 +0200 @@ -84,19 +84,6 @@ static struct caps_table_struct color_ca { 1 << OMAPFB_COLOR_YUY422, "YUY422", }, }; -static void omapdss_release(struct device *dev) -{ -} - -/* dummy device for clocks */ -static struct platform_device omapdss_device = { - .name = "omapdss", - .id = -1, - .dev = { - .release = omapdss_release, - }, -}; - /* * --------------------------------------------------------------------------- * LCD panel @@ -1715,7 +1702,6 @@ static int omapfb_do_probe(struct platfo fbdev->dev = &pdev->dev; fbdev->panel = panel; - fbdev->dssdev = &omapdss_device; platform_set_drvdata(pdev, fbdev); mutex_init(&fbdev->rqueue_mutex); @@ -1830,16 +1816,8 @@ 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) @@ -1867,9 +1845,6 @@ static int omapfb_remove(struct platform fbdev->state = OMAPFB_DISABLED; omapfb_free_resources(fbdev, saved_state); - platform_device_unregister(&omapdss_device); - fbdev->dssdev = NULL; - return 0; } --- drivers/video/omap/rfbi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-2.6.35.orig/drivers/video/omap/rfbi.c +++ linux-2.6.35/drivers/video/omap/rfbi.c @@ -84,13 +84,13 @@ static inline u32 rfbi_read_reg(int idx) static int rfbi_get_clocks(void) { - rfbi.dss_ick = clk_get(&rfbi.fbdev->dssdev->dev, "ick"); + rfbi.dss_ick = clk_get(&omapdss_device.dev, "ick"); if (IS_ERR(rfbi.dss_ick)) { dev_err(rfbi.fbdev->dev, "can't get ick\n"); return PTR_ERR(rfbi.dss_ick); } - rfbi.dss1_fck = clk_get(&rfbi.fbdev->dssdev->dev, "dss1_fck"); + rfbi.dss1_fck = clk_get(&omapdss_device.dev, "dss1_fck"); if (IS_ERR(rfbi.dss1_fck)) { dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n"); clk_put(rfbi.dss_ick);