aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_connector.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-05-30 18:51:59 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 16:13:29 +0300
commita21a8f3c93e1a95cc811a1297ec60aa455a6c523 (patch)
treea2eef3bd226fb2a6f84d147b1cca409d379bb630 /drivers/gpu/drm/omapdrm/omap_connector.c
parentdrm/omap: Don't call HPD registration operations recursively (diff)
downloadlinux-dev-a21a8f3c93e1a95cc811a1297ec60aa455a6c523.tar.xz
linux-dev-a21a8f3c93e1a95cc811a1297ec60aa455a6c523.zip
drm/omap: Remove unneeded safety checks in the HPD operations
The HPD-related omap_dss_device operations are now only called when the device supports HPD. There's no need to duplicate that check in the omap_dss_device drivers. The .register_hpd_cb() operation can as a result be turned into a void operation. 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/omap_connector.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_connector.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
index 05734c908aae..cd33995b0b1a 100644
--- a/drivers/gpu/drm/omapdrm/omap_connector.c
+++ b/drivers/gpu/drm/omapdrm/omap_connector.c
@@ -298,19 +298,10 @@ struct drm_connector *omap_connector_init(struct drm_device *dev,
*/
dssdev = omap_connector_find_device(connector, OMAP_DSS_DEVICE_OP_HPD);
if (dssdev) {
- int ret;
-
- ret = dssdev->ops->register_hpd_cb(dssdev,
- omap_connector_hpd_cb,
- omap_connector);
- if (ret < 0)
- DBG("%s: Failed to register HPD callback (%d).",
- dssdev->name, ret);
- else
- connector->polled = DRM_CONNECTOR_POLL_HPD;
- }
-
- if (!connector->polled) {
+ dssdev->ops->register_hpd_cb(dssdev, omap_connector_hpd_cb,
+ omap_connector);
+ connector->polled = DRM_CONNECTOR_POLL_HPD;
+ } else {
dssdev = omap_connector_find_device(connector,
OMAP_DSS_DEVICE_OP_DETECT);
if (dssdev)