From: Daniel Vetter Date: Wed, 25 Feb 2015 16:52:05 +0000 (+0100) Subject: drm: Remove redundant code in the getencoder ioctl X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=844285317c90910ab6e467b358df697f70e21417;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm: Remove redundant code in the getencoder ioctl When enabling atomic state object for this ioctl in commit abd69c55dd8f1f71b33b8c6165217f4329db8f25 Author: Daniel Vetter Date: Tue Nov 25 23:50:05 2014 +0100 drm: Handle atomic state properly in kms getfoo ioctl I've forgotten to remove this hunk in one of the later revisions. drm_encoder_get_crtc already does this. Cc: Rob Clark Cc: Sean Paul Reviewed-by: Rob Clark Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 927f3445ff38..62f485c952e8 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -2285,8 +2285,6 @@ int drm_mode_getencoder(struct drm_device *dev, void *data, crtc = drm_encoder_get_crtc(encoder); if (crtc) enc_resp->crtc_id = crtc->base.id; - else if (encoder->crtc) - enc_resp->crtc_id = encoder->crtc->base.id; else enc_resp->crtc_id = 0; drm_modeset_unlock(&dev->mode_config.connection_mutex);