Commit a25edf0e authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Tomi Valkeinen

drm/omap: displays: Don't cast dssdev to panel data unnecessarily

The connect handle of the analog TV and HDMI connectors casts the dssdev
to panel data only to then access fields of the panel data that are also
present in the dssdev. Remove the cast and use dssdev directly.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent eaaedaf6
......@@ -43,13 +43,12 @@ static const struct videomode tvc_pal_vm = {
static int tvc_connect(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *src;
int r;
src = omapdss_of_find_connected_device(ddata->dev->of_node, 0);
src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0);
if (IS_ERR_OR_NULL(src)) {
dev_err(ddata->dev, "failed to find video source\n");
dev_err(dssdev->dev, "failed to find video source\n");
return src ? PTR_ERR(src) : -EINVAL;
}
......
......@@ -53,13 +53,12 @@ struct panel_drv_data {
static int hdmic_connect(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *src;
int r;
src = omapdss_of_find_connected_device(ddata->dev->of_node, 0);
src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0);
if (IS_ERR_OR_NULL(src)) {
dev_err(ddata->dev, "failed to find video source\n");
dev_err(dssdev->dev, "failed to find video source\n");
return src ? PTR_ERR(src) : -EINVAL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment