OMAPDSS: get the dss version from core pdev

The output drivers get the omapdss hw version from the platform data for
their respective output device. This doesn't work with DT, as there's no
platform data for them.

Add a new function, omapdss_get_version(), which returns the dss version
from the core device, which will have platform data on DT also. The
function is exported so that users of omapdss can also use it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
Tomi Valkeinen
2012-10-18 13:46:29 +03:00
parent 998c336d4c
commit b2c7d54f72
5 changed files with 13 additions and 7 deletions

View File

@@ -4098,7 +4098,6 @@ static const struct dispc_features omap44xx_dispc_feats __initconst = {
static int __init dispc_init_features(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
const struct dispc_features *src;
struct dispc_features *dst;
@@ -4108,7 +4107,7 @@ static int __init dispc_init_features(struct platform_device *pdev)
return -ENOMEM;
}
switch (pdata->version) {
switch (omapdss_get_version()) {
case OMAPDSS_VER_OMAP24xx:
src = &omap24xx_dispc_feats;
break;