diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-09-12 19:41:31 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2019-03-18 12:42:12 +0300 |
commit | d17eb4537a7eb16da9eafbfd5717e12b45b77251 (patch) | |
tree | 0979073a2e064898c47bef159eb1c3694a89f135 /drivers/gpu/drm/omapdrm/dss/dpi.c | |
parent | 56c9818d5c89b2655c6b4c65b99829faf5b4f544 (diff) | |
download | linux-d17eb4537a7eb16da9eafbfd5717e12b45b77251.tar.xz |
drm/omap: Factor out common init/cleanup code for output devices
All the internal encoders share common init and cleanup code. Factor it
out to separate functions.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/dpi.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/dpi.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index 74e841a2b4eb..0db01cadf09f 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -641,19 +641,9 @@ static int dpi_init_output_port(struct dpi_data *dpi, struct device_node *port) out->ops = &dpi_ops; out->owner = THIS_MODULE; - out->next = omapdss_of_find_connected_device(out->dev->of_node, 0); - if (IS_ERR(out->next)) { - if (PTR_ERR(out->next) != -EPROBE_DEFER) - dev_err(out->dev, "failed to find video sink\n"); - return PTR_ERR(out->next); - } - - r = omapdss_output_validate(out); - if (r) { - omapdss_device_put(out->next); - out->next = NULL; + r = omapdss_device_init_output(out); + if (r < 0) return r; - } omapdss_device_register(out); @@ -665,9 +655,8 @@ static void dpi_uninit_output_port(struct device_node *port) struct dpi_data *dpi = port->data; struct omap_dss_device *out = &dpi->output; - if (out->next) - omapdss_device_put(out->next); omapdss_device_unregister(out); + omapdss_device_cleanup_output(out); } static const struct soc_device_attribute dpi_soc_devices[] = { |