From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752882AbcFFIea (ORCPT ); Mon, 6 Jun 2016 04:34:30 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:32779 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752723AbcFFIdW (ORCPT ); Mon, 6 Jun 2016 04:33:22 -0400 From: Thierry Reding To: Rob Herring , Frank Rowand Cc: Greg Kroah-Hartman , Russell King , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 20/22] drm/sun4i: Use of_device_match() Date: Mon, 6 Jun 2016 10:32:02 +0200 Message-Id: <20160606083204.19760-21-thierry.reding@gmail.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160606083204.19760-1-thierry.reding@gmail.com> References: <20160606083204.19760-1-thierry.reding@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thierry Reding Use the common implementation instead of the driver-private variant. Signed-off-by: Thierry Reding --- drivers/gpu/drm/sun4i/sun4i_drv.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index 257d2b4f3645..6a61d9c8afa1 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -11,6 +11,7 @@ */ #include +#include #include #include @@ -219,15 +220,6 @@ static bool sun4i_drv_node_is_tcon(struct device_node *node) return of_device_is_compatible(node, "allwinner,sun5i-a13-tcon"); } -static int compare_of(struct device *dev, void *data) -{ - DRM_DEBUG_DRIVER("Comparing of node %s with %s\n", - of_node_full_name(dev->of_node), - of_node_full_name(data)); - - return dev->of_node == data; -} - static int sun4i_drv_add_endpoints(struct device *dev, struct component_match **match, struct device_node *node) @@ -248,7 +240,7 @@ static int sun4i_drv_add_endpoints(struct device *dev, /* Add current component */ DRM_DEBUG_DRIVER("Adding component %s\n", of_node_full_name(node)); - component_match_add(dev, match, compare_of, node); + component_match_add(dev, match, of_device_match, node); count++; } -- 2.8.3