summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-02-28 17:30:30 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 16:13:26 +0300
commit7269fde4e8c96e67cd39f456cabf3329b06efffc (patch)
tree3dcfb29263b1e029fa586010bfad3df903c58e95 /drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
parentfb5571717c24c264518aaaf1ab4ec4df73e4cebd (diff)
drm/omap: displays: Remove input omap_dss_device from panel data
All connectors, encoders and panels store a pointer to their input omap_dss_device in the panel driver data structure. This duplicates the src field in the omap_dss_device structure. Remove the private copy and use the src field. 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>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c')
-rw-r--r--drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c42
1 files changed, 18 insertions, 24 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
index 8b5ee55982f4..9117c1ba037b 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
@@ -33,7 +33,6 @@
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
struct videomode vm;
@@ -168,41 +167,37 @@ enum jbt_register {
static int td028ttec1_panel_connect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
- ddata->in = in;
return 0;
}
static void td028ttec1_panel_disconnect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- omapdss_device_disconnect(in, dssdev);
+ omapdss_device_disconnect(src, dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int td028ttec1_panel_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
if (!omapdss_device_is_connected(dssdev))
@@ -211,9 +206,9 @@ static int td028ttec1_panel_enable(struct omap_dss_device *dssdev)
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r)
return r;
@@ -310,7 +305,7 @@ transfer_err:
static void td028ttec1_panel_disable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (!omapdss_device_is_enabled(dssdev))
return;
@@ -322,7 +317,7 @@ static void td028ttec1_panel_disable(struct omap_dss_device *dssdev)
jbt_ret_write_0(ddata, JBT_REG_SLEEP_IN);
jbt_reg_write_1(ddata, JBT_REG_POWER_ON_OFF, 0x00);
- in->ops->disable(in);
+ src->ops->disable(src);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
@@ -331,11 +326,11 @@ static void td028ttec1_panel_set_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static void td028ttec1_panel_get_timings(struct omap_dss_device *dssdev,
@@ -349,10 +344,9 @@ static void td028ttec1_panel_get_timings(struct omap_dss_device *dssdev,
static int td028ttec1_panel_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->check_timings(in, vm);
+ return src->ops->check_timings(src, vm);
}
static const struct omap_dss_driver td028ttec1_ops = {