Skip to content

Commit a25edf0

Browse files
pinchartltomba
authored andcommitted
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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
1 parent eaaedaf commit a25edf0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,12 @@ static const struct videomode tvc_pal_vm = {
4343

4444
static int tvc_connect(struct omap_dss_device *dssdev)
4545
{
46-
struct panel_drv_data *ddata = to_panel_data(dssdev);
4746
struct omap_dss_device *src;
4847
int r;
4948

50-
src = omapdss_of_find_connected_device(ddata->dev->of_node, 0);
49+
src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0);
5150
if (IS_ERR_OR_NULL(src)) {
52-
dev_err(ddata->dev, "failed to find video source\n");
51+
dev_err(dssdev->dev, "failed to find video source\n");
5352
return src ? PTR_ERR(src) : -EINVAL;
5453
}
5554

drivers/gpu/drm/omapdrm/displays/connector-hdmi.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,12 @@ struct panel_drv_data {
5353

5454
static int hdmic_connect(struct omap_dss_device *dssdev)
5555
{
56-
struct panel_drv_data *ddata = to_panel_data(dssdev);
5756
struct omap_dss_device *src;
5857
int r;
5958

60-
src = omapdss_of_find_connected_device(ddata->dev->of_node, 0);
59+
src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0);
6160
if (IS_ERR_OR_NULL(src)) {
62-
dev_err(ddata->dev, "failed to find video source\n");
61+
dev_err(dssdev->dev, "failed to find video source\n");
6362
return src ? PTR_ERR(src) : -EINVAL;
6463
}
6564

0 commit comments

Comments
 (0)