From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752800AbcFFIdY (ORCPT ); Mon, 6 Jun 2016 04:33:24 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36416 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750994AbcFFIdT (ORCPT ); Mon, 6 Jun 2016 04:33:19 -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 19/22] drm/sti: Use of_device_match() Date: Mon, 6 Jun 2016 10:32:01 +0200 Message-Id: <20160606083204.19760-20-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 rather than the driver-private variant. Signed-off-by: Thierry Reding --- drivers/gpu/drm/sti/sti_drv.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index 4ee6fa4f1beb..d0ea8c3b8e3c 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -341,11 +342,6 @@ static struct drm_driver sti_driver = { .minor = DRIVER_MINOR, }; -static int compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static void release_of(struct device *dev, void *data) { of_node_put(data); @@ -381,7 +377,7 @@ static int sti_platform_probe(struct platform_device *pdev) while (child_np) { component_match_add_release(dev, &match, release_of, - compare_of, child_np); + of_device_match, child_np); child_np = of_get_next_available_child(node, child_np); } -- 2.8.3