diff mbox

[2/2] drm/i915: Use drm_crtc_mask() helper

Message ID 1389613610-21084-3-git-send-email-treding@nvidia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thierry Reding Jan. 13, 2014, 11:46 a.m. UTC
Replace an open-coded occurrence by a call to the new drm_crtc_mask()
helper.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/i915/intel_display.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e77d4b8856a7..807feab38ea6 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8723,21 +8723,7 @@  static struct drm_crtc_helper_funcs intel_helper_funcs = {
 static bool intel_encoder_crtc_ok(struct drm_encoder *encoder,
 				  struct drm_crtc *crtc)
 {
-	struct drm_device *dev;
-	struct drm_crtc *tmp;
-	int crtc_mask = 1;
-
-	WARN(!crtc, "checking null crtc?\n");
-
-	dev = crtc->dev;
-
-	list_for_each_entry(tmp, &dev->mode_config.crtc_list, head) {
-		if (tmp == crtc)
-			break;
-		crtc_mask <<= 1;
-	}
-
-	if (encoder->possible_crtcs & crtc_mask)
+	if (encoder->possible_crtcs & drm_crtc_mask(crtc))
 		return true;
 	return false;
 }