diff options
Diffstat (limited to 'drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c index b0e75af56485..db52eb49cff7 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c @@ -19,7 +19,6 @@ struct panel_drv_data { struct omap_dss_device dssdev; - struct omap_dss_device *in; int pd_gpio; @@ -31,23 +30,21 @@ struct panel_drv_data { static int tfp410_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; } @@ -55,18 +52,17 @@ static void tfp410_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 tfp410_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)) @@ -75,9 +71,9 @@ static int tfp410_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; @@ -92,7 +88,7 @@ static int tfp410_enable(struct omap_dss_device *dssdev) static void tfp410_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; @@ -100,7 +96,7 @@ static void tfp410_disable(struct omap_dss_device *dssdev) if (gpio_is_valid(ddata->pd_gpio)) gpio_set_value_cansleep(ddata->pd_gpio, 0); - in->ops->disable(in); + src->ops->disable(src); dssdev->state = OMAP_DSS_DISPLAY_DISABLED; } @@ -115,24 +111,23 @@ static void tfp410_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; tfp410_fix_timings(vm); ddata->vm = *vm; - in->ops->set_timings(in, vm); + src->ops->set_timings(src, vm); } static int tfp410_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; tfp410_fix_timings(vm); - return in->ops->check_timings(in, vm); + return src->ops->check_timings(src, vm); } static const struct omap_dss_device_ops tfp410_ops = { |