diff options
Diffstat (limited to 'drivers/gpu/drm/omapdrm/displays')
14 files changed, 75 insertions, 338 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c b/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c index cda6c312ad05..d59b4f2e22dc 100644 --- a/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c +++ b/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c @@ -41,33 +41,15 @@ static const struct videomode tvc_pal_vm = { #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) -static int tvc_connect(struct omap_dss_device *dssdev) +static int tvc_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src; - int r; - - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR_OR_NULL(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return src ? PTR_ERR(src) : -EINVAL; - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); - return r; - } - return 0; } -static void tvc_disconnect(struct omap_dss_device *dssdev) +static void tvc_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src = dssdev->src; - - omapdss_device_disconnect(src, dssdev); - - omapdss_device_put(src); } static int tvc_enable(struct omap_dss_device *dssdev) @@ -184,7 +166,6 @@ static int __exit tvc_remove(struct platform_device *pdev) omapdss_device_unregister(&ddata->dssdev); tvc_disable(dssdev); - omapdss_device_disconnect(dssdev, NULL); return 0; } diff --git a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c index f8510cd7b166..39e7d0be887f 100644 --- a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c +++ b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c @@ -56,33 +56,15 @@ struct panel_drv_data { #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) -static int dvic_connect(struct omap_dss_device *dssdev) +static int dvic_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src; - int r; - - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR_OR_NULL(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return src ? PTR_ERR(src) : -EINVAL; - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); - return r; - } - return 0; } -static void dvic_disconnect(struct omap_dss_device *dssdev) +static void dvic_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src = dssdev->src; - - omapdss_device_disconnect(src, dssdev); - - omapdss_device_put(src); } static int dvic_enable(struct omap_dss_device *dssdev) @@ -405,7 +387,6 @@ static int __exit dvic_remove(struct platform_device *pdev) omapdss_device_unregister(&ddata->dssdev); dvic_disable(dssdev); - omapdss_device_disconnect(dssdev, NULL); i2c_put_adapter(ddata->i2c_adapter); diff --git a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c index 6eb4c24d6aa7..e9878da5bfdb 100644 --- a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c +++ b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c @@ -51,33 +51,15 @@ struct panel_drv_data { #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) -static int hdmic_connect(struct omap_dss_device *dssdev) +static int hdmic_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src; - int r; - - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR_OR_NULL(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return src ? PTR_ERR(src) : -EINVAL; - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); - return r; - } - return 0; } -static void hdmic_disconnect(struct omap_dss_device *dssdev) +static void hdmic_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src = dssdev->src; - - omapdss_device_disconnect(src, dssdev); - - omapdss_device_put(src); } static int hdmic_enable(struct omap_dss_device *dssdev) @@ -364,7 +346,6 @@ static int __exit hdmic_remove(struct platform_device *pdev) omapdss_device_unregister(&ddata->dssdev); hdmic_disable(dssdev); - omapdss_device_disconnect(dssdev, NULL); return 0; } diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c index f661ba8f3fa0..3243e5f9bd06 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c @@ -31,36 +31,16 @@ struct panel_drv_data { #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) -static int opa362_connect(struct omap_dss_device *dssdev, - struct omap_dss_device *dst) +static int opa362_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src; - int r; - - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return PTR_ERR(src); - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); - return r; - } - - return 0; + return omapdss_device_connect(dst->dss, dst, dst->next); } -static void opa362_disconnect(struct omap_dss_device *dssdev, - struct omap_dss_device *dst) +static void opa362_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct panel_drv_data *ddata = to_panel_data(dssdev); - struct omap_dss_device *src = dssdev->src; - - omapdss_device_disconnect(src, &ddata->dssdev); - - omapdss_device_put(src); + omapdss_device_disconnect(dst, dst->next); } static int opa362_enable(struct omap_dss_device *dssdev) @@ -196,7 +176,7 @@ static int __exit opa362_remove(struct platform_device *pdev) WARN_ON(omapdss_device_is_connected(dssdev)); if (omapdss_device_is_connected(dssdev)) - omapdss_device_disconnect(dssdev, dssdev->dst); + omapdss_device_disconnect(NULL, dssdev); return 0; } diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c index 3be35ba564da..7114ea672e69 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c @@ -27,36 +27,16 @@ struct panel_drv_data { #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) -static int tfp410_connect(struct omap_dss_device *dssdev, - struct omap_dss_device *dst) +static int tfp410_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src; - int r; - - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return PTR_ERR(src); - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); - return r; - } - - return 0; + return omapdss_device_connect(dst->dss, dst, dst->next); } -static void tfp410_disconnect(struct omap_dss_device *dssdev, - struct omap_dss_device *dst) +static void tfp410_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct panel_drv_data *ddata = to_panel_data(dssdev); - struct omap_dss_device *src = dssdev->src; - - omapdss_device_disconnect(src, &ddata->dssdev); - - omapdss_device_put(src); + omapdss_device_disconnect(dst, dst->next); } static int tfp410_enable(struct omap_dss_device *dssdev) @@ -219,7 +199,7 @@ static int __exit tfp410_remove(struct platform_device *pdev) WARN_ON(omapdss_device_is_connected(dssdev)); if (omapdss_device_is_connected(dssdev)) - omapdss_device_disconnect(dssdev, dssdev->dst); + omapdss_device_disconnect(NULL, dssdev); return 0; } diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c index cee53346f6fc..c99e55487d38 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c @@ -35,24 +35,15 @@ struct panel_drv_data { #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) -static int tpd_connect(struct omap_dss_device *dssdev, - struct omap_dss_device *dst) +static int tpd_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct panel_drv_data *ddata = to_panel_data(dssdev); - struct omap_dss_device *src; + struct panel_drv_data *ddata = to_panel_data(dst); int r; - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return PTR_ERR(src); - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); + r = omapdss_device_connect(dst->dss, dst, dst->next); + if (r) return r; - } gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 1); gpiod_set_value_cansleep(ddata->ls_oe_gpio, 1); @@ -63,18 +54,15 @@ static int tpd_connect(struct omap_dss_device *dssdev, return 0; } -static void tpd_disconnect(struct omap_dss_device *dssdev, - struct omap_dss_device *dst) +static void tpd_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct panel_drv_data *ddata = to_panel_data(dssdev); - struct omap_dss_device *src = dssdev->src; + struct panel_drv_data *ddata = to_panel_data(dst); gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0); gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0); - omapdss_device_disconnect(src, &ddata->dssdev); - - omapdss_device_put(src); + omapdss_device_disconnect(dst, dst->next); } static int tpd_enable(struct omap_dss_device *dssdev) @@ -328,7 +316,7 @@ static int __exit tpd_remove(struct platform_device *pdev) WARN_ON(omapdss_device_is_connected(dssdev)); if (omapdss_device_is_connected(dssdev)) - omapdss_device_disconnect(dssdev, dssdev->dst); + omapdss_device_disconnect(NULL, dssdev); return 0; } diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c index 8c17ad4ddf84..91f99c95c4c4 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c @@ -34,33 +34,15 @@ struct panel_drv_data { #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev) -static int panel_dpi_connect(struct omap_dss_device *dssdev) +static int panel_dpi_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src; - int r; - - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR_OR_NULL(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return src ? PTR_ERR(src) : -EINVAL; - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); - return r; - } - return 0; } -static void panel_dpi_disconnect(struct omap_dss_device *dssdev) +static void panel_dpi_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src = dssdev->src; - - omapdss_device_disconnect(src, dssdev); - - omapdss_device_put(src); } static int panel_dpi_enable(struct omap_dss_device *dssdev) @@ -233,7 +215,6 @@ static int __exit panel_dpi_remove(struct platform_device *pdev) omapdss_device_unregister(dssdev); panel_dpi_disable(dssdev); - omapdss_device_disconnect(dssdev, NULL); return 0; } diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index 501c47f95130..e30f0ab315f5 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -756,57 +756,35 @@ static int dsicm_panel_reset(struct panel_drv_data *ddata) return dsicm_power_on(ddata); } -static int dsicm_connect(struct omap_dss_device *dssdev) +static int dsicm_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct panel_drv_data *ddata = to_panel_data(dssdev); + struct panel_drv_data *ddata = to_panel_data(dst); struct device *dev = &ddata->pdev->dev; - struct omap_dss_device *src; int r; - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR_OR_NULL(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return src ? PTR_ERR(src) : -EINVAL; - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - dev_err(dev, "Failed to connect to video source\n"); - goto err_connect; - } - r = src->ops->dsi.request_vc(src, &ddata->channel); if (r) { dev_err(dev, "failed to get virtual channel\n"); - goto err_req_vc; + return r; } r = src->ops->dsi.set_vc_id(src, ddata->channel, TCH); if (r) { dev_err(dev, "failed to set VC_ID\n"); - goto err_vc_id; + src->ops->dsi.release_vc(src, ddata->channel); + return r; } return 0; - -err_vc_id: - src->ops->dsi.release_vc(src, ddata->channel); -err_req_vc: - omapdss_device_disconnect(src, dssdev); -err_connect: - omapdss_device_put(src); - return r; } -static void dsicm_disconnect(struct omap_dss_device *dssdev) +static void dsicm_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct panel_drv_data *ddata = to_panel_data(dssdev); - struct omap_dss_device *src = dssdev->src; + struct panel_drv_data *ddata = to_panel_data(dst); src->ops->dsi.release_vc(src, ddata->channel); - omapdss_device_disconnect(src, dssdev); - - omapdss_device_put(src); } static int dsicm_enable(struct omap_dss_device *dssdev) @@ -1404,7 +1382,7 @@ static int __exit dsicm_remove(struct platform_device *pdev) omapdss_device_unregister(dssdev); dsicm_disable(dssdev); - omapdss_device_disconnect(dssdev, NULL); + omapdss_device_disconnect(dssdev->src, dssdev); sysfs_remove_group(&pdev->dev.kobj, &dsicm_attr_group); diff --git a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c index 73416b1c7386..66763a12fc3d 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c @@ -115,36 +115,19 @@ static void init_lb035q02_panel(struct spi_device *spi) lb035q02_write_reg(spi, 0x3b, 0x0806); } -static int lb035q02_connect(struct omap_dss_device *dssdev) +static int lb035q02_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct panel_drv_data *ddata = to_panel_data(dssdev); - struct omap_dss_device *src; - int r; - - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR_OR_NULL(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return src ? PTR_ERR(src) : -EINVAL; - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); - return r; - } + struct panel_drv_data *ddata = to_panel_data(dst); init_lb035q02_panel(ddata->spi); return 0; } -static void lb035q02_disconnect(struct omap_dss_device *dssdev) +static void lb035q02_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src = dssdev->src; - - omapdss_device_disconnect(src, dssdev); - - omapdss_device_put(src); } static int lb035q02_enable(struct omap_dss_device *dssdev) @@ -285,7 +268,6 @@ static int lb035q02_panel_spi_remove(struct spi_device *spi) omapdss_device_unregister(dssdev); lb035q02_disable(dssdev); - omapdss_device_disconnect(dssdev, NULL); return 0; } diff --git a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c index cf5d9e1522a8..b4dba55b678b 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c @@ -111,33 +111,15 @@ static int init_nec_8048_wvga_lcd(struct spi_device *spi) return 0; } -static int nec_8048_connect(struct omap_dss_device *dssdev) +static int nec_8048_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src; - int r; - - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR_OR_NULL(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return src ? PTR_ERR(src) : -EINVAL; - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); - return r; - } - return 0; } -static void nec_8048_disconnect(struct omap_dss_device *dssdev) +static void nec_8048_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src = dssdev->src; - - omapdss_device_disconnect(src, dssdev); - - omapdss_device_put(src); } static int nec_8048_enable(struct omap_dss_device *dssdev) @@ -310,7 +292,6 @@ static int nec_8048_remove(struct spi_device *spi) omapdss_device_unregister(dssdev); nec_8048_disable(dssdev); - omapdss_device_disconnect(dssdev, NULL); return 0; } diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c index 1c3180495dfd..7fbdf3ec0113 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c @@ -57,33 +57,15 @@ static const struct videomode sharp_ls_vm = { #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev) -static int sharp_ls_connect(struct omap_dss_device *dssdev) +static int sharp_ls_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src; - int r; - - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR_OR_NULL(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return src ? PTR_ERR(src) : -EINVAL; - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); - return r; - } - return 0; } -static void sharp_ls_disconnect(struct omap_dss_device *dssdev) +static void sharp_ls_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src = dssdev->src; - - omapdss_device_disconnect(src, dssdev); - - omapdss_device_put(src); } static int sharp_ls_enable(struct omap_dss_device *dssdev) @@ -284,7 +266,6 @@ static int __exit sharp_ls_remove(struct platform_device *pdev) omapdss_device_unregister(dssdev); sharp_ls_disable(dssdev); - omapdss_device_disconnect(dssdev, NULL); return 0; } diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c index d91ab8dab4d9..036fd8e57074 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c @@ -506,33 +506,15 @@ static const struct attribute_group bldev_attr_group = { .attrs = bldev_attrs, }; -static int acx565akm_connect(struct omap_dss_device *dssdev) +static int acx565akm_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src; - int r; - - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR_OR_NULL(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return src ? PTR_ERR(src) : -EINVAL; - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); - return r; - } - return 0; } -static void acx565akm_disconnect(struct omap_dss_device *dssdev) +static void acx565akm_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src = dssdev->src; - - omapdss_device_disconnect(src, dssdev); - - omapdss_device_put(src); } static int acx565akm_panel_power_on(struct omap_dss_device *dssdev) @@ -822,7 +804,6 @@ static int acx565akm_remove(struct spi_device *spi) omapdss_device_unregister(dssdev); acx565akm_disable(dssdev); - omapdss_device_disconnect(dssdev, NULL); return 0; } diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c index a57daf44d421..fc08f71b95a0 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c @@ -165,33 +165,15 @@ enum jbt_register { #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev) -static int td028ttec1_panel_connect(struct omap_dss_device *dssdev) +static int td028ttec1_panel_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src; - int r; - - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR_OR_NULL(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return src ? PTR_ERR(src) : -EINVAL; - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); - return r; - } - return 0; } -static void td028ttec1_panel_disconnect(struct omap_dss_device *dssdev) +static void td028ttec1_panel_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src = dssdev->src; - - omapdss_device_disconnect(src, dssdev); - - omapdss_device_put(src); } static int td028ttec1_panel_enable(struct omap_dss_device *dssdev) @@ -411,7 +393,6 @@ static int td028ttec1_panel_remove(struct spi_device *spi) omapdss_device_unregister(dssdev); td028ttec1_panel_disable(dssdev); - omapdss_device_disconnect(dssdev, NULL); return 0; } diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c index 719c298d3996..cb6f19f8a0da 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c @@ -336,33 +336,15 @@ static void tpo_td043_power_off(struct panel_drv_data *ddata) ddata->powered_on = 0; } -static int tpo_td043_connect(struct omap_dss_device *dssdev) +static int tpo_td043_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src; - int r; - - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR_OR_NULL(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return src ? PTR_ERR(src) : -EINVAL; - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); - return r; - } - return 0; } -static void tpo_td043_disconnect(struct omap_dss_device *dssdev) +static void tpo_td043_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src = dssdev->src; - - omapdss_device_disconnect(src, dssdev); - - omapdss_device_put(src); } static int tpo_td043_enable(struct omap_dss_device *dssdev) @@ -553,7 +535,6 @@ static int tpo_td043_remove(struct spi_device *spi) omapdss_device_unregister(dssdev); tpo_td043_disable(dssdev); - omapdss_device_disconnect(dssdev, NULL); sysfs_remove_group(&spi->dev.kobj, &tpo_td043_attr_group); |