Message ID | 1559577023-558-9-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 q26csp4644022ili; Mon, 3 Jun 2019 08:51:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOGkL5x3sWebMjlxINx+FwkzytC200EUN77K6YdJBVMDmV0SmxHpQ5PiM1zPmEmNJoWT8t X-Received: by 2002:a63:649:: with SMTP id 70mr4855192pgg.445.1559577076311; Mon, 03 Jun 2019 08:51:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577076; cv=none; d=google.com; s=arc-20160816; b=afjtD1etC8EFTzI46w+X3jwl2NigBc177zOEvbslEmaMjOMXgW3p5DQz3tFnJcBPKZ PJI+TwElXEWMpTUyrckNM3rXA6uOReeAk81vgxd237QVlDiQT+X4RaNtDZKtZAKKRr2N HN89kXHj+fveucKDhQOMs7CkY1rKx2NyE1GUFA7VOp6i6uDym7bYe0Nt5oGDEGM54UWM lOI52uake5G4xm4oNATa7bYb63PUBDvlYqRMAlNdEXPpWc5jsb889Q9JqeQEUZCocwdf 2zEow5rpDQlrlyNeDRV8uu73L6gjPP8vydjaMNUZuFQpeThYfnjXFWLY2sDHQDScKi2A PdrA== 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=ocnRt0bCItZ/Am5HRnK+DH6tyri0NxsG66hzg5kj4wU=; b=ehWykUYCmvVqdbhl31pteDCI8Dly3dHCvt/TJWzMQ6HMu6IlzqjwXPGWInOPOzBneN d2dF06pQkmvHXs1UbtGHbdAhu2Zxi5fh4vi7ooNOARAiTcaC98lVzZC0+LH1SQIuAUK6 quCGmhEE1SgP9okDwxRKLB64TbfzV7r70DpHSDLDMsyuCcJsQdJLHqf9g1PUlsqmc0g2 MdFIkFwBMC/M5aAVuJAyMj9kSOOE6lFI5jASjXbB3Hlgr3oVlL9Gb2w/61S9hbWwT4M1 Y92QxNVhGoDVLXGw0iGsN+pz8t9L7+TKIDuuypykJVyr7+Qn97z62UwktVF3sSJiHzJC e+ug== 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 g69si20591014plb.70.2019.06.03.08.51.16; Mon, 03 Jun 2019 08:51:16 -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 S1728639AbfFCPvP (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Mon, 3 Jun 2019 11:51:15 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53598 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728473AbfFCPvK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jun 2019 11:51:10 -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 91D9D169E; Mon, 3 Jun 2019 08:51:10 -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 558303F246; Mon, 3 Jun 2019 08:51:09 -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, Mark Brown <broonie@kernel.org>, linux-spi@vger.kernel.org Subject: [RFC PATCH 08/57] drivers: spi: Use bus_find_device_by_of_node helper Date: Mon, 3 Jun 2019 16:49:34 +0100 Message-Id: <1559577023-558-9-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
|
On Mon, Jun 03, 2019 at 04:49:34PM +0100, Suzuki K Poulose wrote: > Switch to using the bus_find_device_by_of_node helper Acked-by: Mark Brown <broonie@kernel.org>
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 5e75944..ecdd602 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -3538,16 +3538,11 @@ EXPORT_SYMBOL_GPL(spi_write_then_read); /*-------------------------------------------------------------------------*/ #if IS_ENABLED(CONFIG_OF) -static int __spi_of_device_match(struct device *dev, void *data) -{ - return dev->of_node == data; -} - /* must call put_device() when done with returned spi_device device */ struct spi_device *of_find_spi_device_by_node(struct device_node *node) { - struct device *dev = bus_find_device(&spi_bus_type, NULL, node, - __spi_of_device_match); + struct device *dev = bus_find_device_by_of_node(&spi_bus_type, NULL, node); + return dev ? to_spi_device(dev) : NULL; } EXPORT_SYMBOL_GPL(of_find_spi_device_by_node);
Switch to using the bus_find_device_by_of_node helper Cc: Mark Brown <broonie@kernel.org> Cc: linux-spi@vger.kernel.org Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- drivers/spi/spi.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) -- 2.7.4