Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754088AbbF3O7H (ORCPT ); Tue, 30 Jun 2015 10:59:07 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:35899 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753649AbbF3O5R (ORCPT ); Tue, 30 Jun 2015 10:57:17 -0400 From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Cc: "Rafael J. Wysocki" , Mark Brown , Tomeu Vizoso , Greg Kroah-Hartman Subject: [PATCH v1 10/10] core: platform: use fwnode_driver_match_device() Date: Tue, 30 Jun 2015 16:55:08 +0200 Message-Id: <1435676108-20590-11-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.4.1 In-Reply-To: <1435676108-20590-1-git-send-email-tomeu.vizoso@collabora.com> References: <1435676108-20590-1-git-send-email-tomeu.vizoso@collabora.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1250 Lines: 38 Instead of calling both of_driver_match_device() and acpi_driver_match_device(), call fwnode_driver_match_device() which should be able to sort out what firmware describes the device in question. Signed-off-by: Tomeu Vizoso --- drivers/base/platform.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 063f0ab..a7e7757 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -843,12 +843,8 @@ static int platform_match(struct device *dev, struct device_driver *drv) if (pdev->driver_override) return !strcmp(pdev->driver_override, drv->name); - /* Attempt an OF style match first */ - if (of_driver_match_device(dev, drv)) - return 1; - - /* Then try ACPI style match */ - if (acpi_driver_match_device(dev, drv)) + /* Attempt a firmware match first */ + if (fwnode_driver_match_device(dev, drv)) return 1; /* Then try to match against the id table */ -- 2.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/