diff options
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r-- | drivers/video/omap2/dss/core.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 9b84f134357e..c3566a05d168 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c | |||
@@ -43,6 +43,8 @@ static struct { | |||
43 | 43 | ||
44 | struct regulator *vdds_dsi_reg; | 44 | struct regulator *vdds_dsi_reg; |
45 | struct regulator *vdds_sdi_reg; | 45 | struct regulator *vdds_sdi_reg; |
46 | |||
47 | const char *default_display_name; | ||
46 | } core; | 48 | } core; |
47 | 49 | ||
48 | static char *def_disp_name; | 50 | static char *def_disp_name; |
@@ -222,6 +224,11 @@ static int __init omap_dss_probe(struct platform_device *pdev) | |||
222 | if (r) | 224 | if (r) |
223 | goto err_debugfs; | 225 | goto err_debugfs; |
224 | 226 | ||
227 | if (def_disp_name) | ||
228 | core.default_display_name = def_disp_name; | ||
229 | else if (pdata->default_device) | ||
230 | core.default_display_name = pdata->default_device->name; | ||
231 | |||
225 | for (i = 0; i < pdata->num_devices; ++i) { | 232 | for (i = 0; i < pdata->num_devices; ++i) { |
226 | struct omap_dss_device *dssdev = pdata->devices[i]; | 233 | struct omap_dss_device *dssdev = pdata->devices[i]; |
227 | 234 | ||
@@ -235,9 +242,6 @@ static int __init omap_dss_probe(struct platform_device *pdev) | |||
235 | 242 | ||
236 | goto err_register; | 243 | goto err_register; |
237 | } | 244 | } |
238 | |||
239 | if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0) | ||
240 | pdata->default_device = dssdev; | ||
241 | } | 245 | } |
242 | 246 | ||
243 | return 0; | 247 | return 0; |
@@ -360,7 +364,6 @@ static int dss_driver_probe(struct device *dev) | |||
360 | int r; | 364 | int r; |
361 | struct omap_dss_driver *dssdrv = to_dss_driver(dev->driver); | 365 | struct omap_dss_driver *dssdrv = to_dss_driver(dev->driver); |
362 | struct omap_dss_device *dssdev = to_dss_device(dev); | 366 | struct omap_dss_device *dssdev = to_dss_device(dev); |
363 | struct omap_dss_board_info *pdata = core.pdev->dev.platform_data; | ||
364 | bool force; | 367 | bool force; |
365 | 368 | ||
366 | DSSDBG("driver_probe: dev %s/%s, drv %s\n", | 369 | DSSDBG("driver_probe: dev %s/%s, drv %s\n", |
@@ -369,7 +372,8 @@ static int dss_driver_probe(struct device *dev) | |||
369 | 372 | ||
370 | dss_init_device(core.pdev, dssdev); | 373 | dss_init_device(core.pdev, dssdev); |
371 | 374 | ||
372 | force = pdata->default_device == dssdev; | 375 | force = core.default_display_name && |
376 | strcmp(core.default_display_name, dssdev->name) == 0; | ||
373 | dss_recheck_connections(dssdev, force); | 377 | dss_recheck_connections(dssdev, force); |
374 | 378 | ||
375 | r = dssdrv->probe(dssdev); | 379 | r = dssdrv->probe(dssdev); |