summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.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-lgphilips-lb035q02.c
parentfb5571717c24c264518aaaf1ab4ec4df73e4cebd (diff)
downloadlinux-7269fde4e8c96e67cd39f456cabf3329b06efffc.tar.gz
linux-7269fde4e8c96e67cd39f456cabf3329b06efffc.tar.bz2
linux-7269fde4e8c96e67cd39f456cabf3329b06efffc.zip
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-lgphilips-lb035q02.c')
-rw-r--r--drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c41
1 files changed, 18 insertions, 23 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
index ea4cdc8bd2f8..2e54ac115dbc 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
@@ -45,7 +45,6 @@ static const struct videomode lb035q02_vm = {
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
struct spi_device *spi;
@@ -119,42 +118,39 @@ static void init_lb035q02_panel(struct spi_device *spi)
static int lb035q02_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;
}
init_lb035q02_panel(ddata->spi);
- ddata->in = in;
return 0;
}
static void lb035q02_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 lb035q02_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))
@@ -163,9 +159,9 @@ static int lb035q02_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;
@@ -180,7 +176,7 @@ static int lb035q02_enable(struct omap_dss_device *dssdev)
static void lb035q02_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;
@@ -188,7 +184,7 @@ static void lb035q02_disable(struct omap_dss_device *dssdev)
if (ddata->enable_gpio)
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
- in->ops->disable(in);
+ src->ops->disable(src);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
@@ -197,11 +193,11 @@ static void lb035q02_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 lb035q02_get_timings(struct omap_dss_device *dssdev,
@@ -215,10 +211,9 @@ static void lb035q02_get_timings(struct omap_dss_device *dssdev,
static int lb035q02_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 lb035q02_ops = {