Message ID | 1559577023-558-53-git-send-email-suzuki.poulose@arm.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4645122ili; Mon, 3 Jun 2019 08:52:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQJdOFgcv1vmvLX4OXMLpRqk4BXfs+b6ez12iMexfiyRF1GsYkTwA117ngRfn1eepcL4NC X-Received: by 2002:a17:902:7c08:: with SMTP id x8mr30480353pll.159.1559577142700; Mon, 03 Jun 2019 08:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577142; cv=none; d=google.com; s=arc-20160816; b=K0tOZ3g/SfxyFvrVehOMPvgzN4uJ/OvBhbzTL86xxdKpeuzUqHFq7ys5C/u6NqVE+s DiYnEEbfO4SOhXG9TFjmGfMbGxUS3us7PEKs38tfDRtDyvVrgo9NnZobfvuDc0eCEPhS fio7yaJBTlk0hzyGyIp4bF4KiLyS0ervxX97kbGSpLd2RZl0DHJgYYZCO7tM4DuH3A61 NKuT8faSuWxOD7Yt4uXnIRzCK9HfgHuO+FXXLLoNO3NDy6jFULQyAk7uaZlo46cU0h0j vGhnidj5PIyxBeDw96opiizcwYXyayoKm+DOOnYkxM9F9BNz4fFD5nb3OWXQS7GfmI22 pAdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=0bkKekUgA4MfoQU08+q2/0kdsNuL8T303y6zKmR/n3g=; b=tK8jZJZe6c+YDRy6Nd6aGutWshnMFy0W48/olsm2r3p4qnM2PH0ZiuiUNMSGkl0FOc 1B7J+k7y24uXpsj9RznjGwlgPKd6EHoUx4xVwnlECvdWhQbr45IjAMILOIvT8Mdunsxz 6aQyWb78ImraF5rnbpj7AYaESBEwXllKAgF2aiWCIW1I4N+HNOAINdyDE+MdFVcuG36X AGSsjAREzvdNIP6ElipDBOlJJaWzUBDcuMoKvbdAD/M0iViNO7z0KUck24ELEAqWfLzH KaWn3pbLEdWO3MHS27wSqZfVa8qQ5kK+s9tsWZJPkEOuUVJqKFPtpEgXneXUBqDqL2fD KZxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h4si17718022pgs.269.2019.06.03.08.52.22; Mon, 03 Jun 2019 08:52:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729601AbfFCPwV (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Mon, 3 Jun 2019 11:52:21 -0400 Received: from foss.arm.com ([217.140.101.70]:54082 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729576AbfFCPwT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jun 2019 11:52:19 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C3ACF15AB; Mon, 3 Jun 2019 08:52:18 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 877233F246; Mon, 3 Jun 2019 08:52:17 -0700 (PDT) From: Suzuki K Poulose <suzuki.poulose@arm.com> To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.com> Subject: [RFC PATCH 52/57] drivers: tegra: Use driver_find_device_by_of_node() helper Date: Mon, 3 Jun 2019 16:50:18 +0100 Message-Id: <1559577023-558-53-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> References: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
[RFC,01/57] drivers: s390/cio: Use driver_for_each_device
|
expand
|
diff --git a/drivers/amba/tegra-ahb.c b/drivers/amba/tegra-ahb.c index 42175a6..5ce0f66 100644 --- a/drivers/amba/tegra-ahb.c +++ b/drivers/amba/tegra-ahb.c @@ -143,22 +143,13 @@ static inline void gizmo_writel(struct tegra_ahb *ahb, u32 value, u32 offset) } #ifdef CONFIG_TEGRA_IOMMU_SMMU -static int tegra_ahb_match_by_smmu(struct device *dev, const void *data) -{ - struct tegra_ahb *ahb = dev_get_drvdata(dev); - const struct device_node *dn = data; - - return (ahb->dev->of_node == dn) ? 1 : 0; -} - int tegra_ahb_enable_smmu(struct device_node *dn) { struct device *dev; u32 val; struct tegra_ahb *ahb; - dev = driver_find_device(&tegra_ahb_driver.driver, NULL, dn, - tegra_ahb_match_by_smmu); + dev = driver_find_device_by_of_node(&tegra_ahb_driver.driver, NULL, dn); if (!dev) return -EPROBE_DEFER; ahb = dev_get_drvdata(dev);
Switch to using the new helper driver_find_device_by_of_node(). Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Jonathan Hunter <jonathanh@nvidia.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- drivers/amba/tegra-ahb.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) -- 2.7.4