From patchwork Fri Jul 18 03:29:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 4579731 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D1A2E9F37C for ; Fri, 18 Jul 2014 03:30:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A24D20125 for ; Fri, 18 Jul 2014 03:30:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 52624200E1 for ; Fri, 18 Jul 2014 03:30:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B90676E718; Thu, 17 Jul 2014 20:30:27 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f44.google.com (mail-qg0-f44.google.com [209.85.192.44]) by gabe.freedesktop.org (Postfix) with ESMTP id AC5B76E718 for ; Thu, 17 Jul 2014 20:30:24 -0700 (PDT) Received: by mail-qg0-f44.google.com with SMTP id e89so2795283qgf.31 for ; Thu, 17 Jul 2014 20:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JOoJDIrVqZ84u/MQV8W/xbezrpO5lcz3QoFgS9odV0k=; b=FpqGgafa9HC6lcjsKVYJ7GWXrb9C1oYC6LzSfaJ62x53X66eJZN9esGqFRvNA5wfnu QmADNE6y9D+m/ZUhPwkPN7qFXQmGYBeR10ruAjx0f2eL2rWf8eRV1ipIMfFBe2OKqo+u aX+PYn9l7dxKy5CkYazHEJF7DNjvLLuMbhxvcvoFXwTc7Q5Bw4CCQtQQL37RRDUeQ1zL C0ZDcgvcE6fFDyX6G4fjBFfCfkLWq/d3v3H0Leud8iL38DbgtPx6vaUMPugwLgzzqM8Q vMRHvVjXw/O5nxBufY8FgxrfFzzi8sw03LTgNfl+GSnHSbwFsRlOSw64BgtnwFwwr46b 7RDg== X-Received: by 10.224.132.69 with SMTP id a5mr2662469qat.77.1405654224250; Thu, 17 Jul 2014 20:30:24 -0700 (PDT) Received: from localhost ([172.56.22.126]) by mx.google.com with ESMTPSA id 81sm4892719qgw.21.2014.07.17.20.30.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jul 2014 20:30:23 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH 04/10] drm/exynos: use helpers Date: Thu, 17 Jul 2014 23:29:59 -0400 Message-Id: <1405654205-30810-5-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1405654205-30810-1-git-send-email-robdclark@gmail.com> References: <1405654205-30810-1-git-send-email-robdclark@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Rob Clark --- drivers/gpu/drm/exynos/exynos_drm_connector.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c index 25c7888..ba9b3d5 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_connector.c +++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c @@ -117,20 +117,7 @@ static struct drm_encoder *exynos_drm_best_encoder( struct drm_device *dev = connector->dev; struct exynos_drm_connector *exynos_connector = to_exynos_connector(connector); - struct drm_mode_object *obj; - struct drm_encoder *encoder; - - obj = drm_mode_object_find(dev, exynos_connector->encoder_id, - DRM_MODE_OBJECT_ENCODER); - if (!obj) { - DRM_DEBUG_KMS("Unknown ENCODER ID %d\n", - exynos_connector->encoder_id); - return NULL; - } - - encoder = obj_to_encoder(obj); - - return encoder; + return drm_encoder_find(dev, exynos_connector->encoder_id); } static struct drm_connector_helper_funcs exynos_connector_helper_funcs = {