diff options
Diffstat (limited to 'drivers/gpu/drm/omapdrm/displays/encoder-opa362.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/displays/encoder-opa362.c | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c index c058f889700d..a190bcf08738 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c @@ -23,7 +23,6 @@ struct panel_drv_data { struct omap_dss_device dssdev; - struct omap_dss_device *in; struct gpio_desc *enable_gpio; @@ -35,23 +34,21 @@ struct panel_drv_data { static int opa362_connect(struct omap_dss_device *dssdev, struct omap_dss_device *dst) { - 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; } @@ -59,18 +56,17 @@ static void opa362_disconnect(struct omap_dss_device *dssdev, struct omap_dss_device *dst) { 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, &ddata->dssdev); + omapdss_device_disconnect(src, &ddata->dssdev); - omap_dss_put_device(in); - ddata->in = NULL; + omap_dss_put_device(src); } static int opa362_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; dev_dbg(dssdev->dev, "enable\n"); @@ -81,9 +77,9 @@ static int opa362_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; @@ -98,7 +94,7 @@ static int opa362_enable(struct omap_dss_device *dssdev) static void opa362_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; dev_dbg(dssdev->dev, "disable\n"); @@ -108,7 +104,7 @@ static void opa362_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; } @@ -117,24 +113,23 @@ static void opa362_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; dev_dbg(dssdev->dev, "set_timings\n"); ddata->vm = *vm; - in->ops->set_timings(in, vm); + src->ops->set_timings(src, vm); } static int opa362_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; dev_dbg(dssdev->dev, "check_timings\n"); - return in->ops->check_timings(in, vm); + return src->ops->check_timings(src, vm); } static const struct omap_dss_device_ops opa362_ops = { |