Replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi since monitor HDMI information is available after EDID is parsed. Additionally rewrite the code the code to have fewer indentation levels. Signed-off-by: Tejas Vipin <tejasvipin76@xxxxxxxxx> --- drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c index 2d95e0471291..cfbf3137e144 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c +++ b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c @@ -135,16 +135,16 @@ static enum drm_connector_status cdv_hdmi_detect( hdmi_priv->has_hdmi_sink = false; hdmi_priv->has_hdmi_audio = false; - if (edid) { - if (edid->input & DRM_EDID_INPUT_DIGITAL) { - status = connector_status_connected; - hdmi_priv->has_hdmi_sink = - drm_detect_hdmi_monitor(edid); - hdmi_priv->has_hdmi_audio = - drm_detect_monitor_audio(edid); - } - kfree(edid); + if (!edid) + return status; + + if (edid->input & DRM_EDID_INPUT_DIGITAL) { + status = connector_status_connected; + hdmi_priv->has_hdmi_sink = connector->display_info.is_hdmi; + hdmi_priv->has_hdmi_audio = drm_detect_monitor_audio(edid); } + kfree(edid); + return status; } -- 2.46.0