From patchwork Mon Jun 3 15:49:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 165651 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4647103ili; Mon, 3 Jun 2019 08:54:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwESdgL3Zzmhkg+XlVCV5mw/mNR4hL1QdZmLueS65WL34XKBosGMjSpVjwyDQ3uk+a1olAL X-Received: by 2002:aa7:825a:: with SMTP id e26mr32586904pfn.255.1559577255293; Mon, 03 Jun 2019 08:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577255; cv=none; d=google.com; s=arc-20160816; b=i0eBggEFDt74jB0x2cVKmjPZ+d2z5W0jspXz2/OPzDSPaIsztsU4l2kkWzF+p+Suel UnzR1K77VQj7/0vbSbO3WELpCiT7hC2uu2w0mWvnrjvjtOXPQCPmXOTvLwUyzPcaIqwh nuQXv6dK3lRy4jx6Hxu5kWLA+JuAuFiEbprYUtqieTFSwYYowXm3g4Vx3dy2AdTiiJTf nalAA5oaDzfH8eTdKMDw/ngXFFJ9f+6o60EbMmPub6X0LSN7QqQ6r2Zp+7P9C+xurlLP jNI9LLv+fAQPrse70EMNqiCgEHGIMTJ5eYcrbTS4SnONSzXR9060PrQVBF6M4skDbYx6 cTig== 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=ZTMfSUAZtEt7RqG7VeFS6JrBxExGihO8oomxyuQxr0E=; b=0ufHQGFJYPkxaBdQ1nIx28o8f5W3QS9rC4HtqltBBrHdwcH//wPnJdMt+WC9a5QR5H sAk8zz5wgP8cwCYLii7wO7beEQJP5YngksOYXmYnGxU7/EonCrWzTFiP5Fdz8AkerEG2 LuyiyfZz+Wq3tlkZjJbxVr59l6WdpaHVtMp6c5l8MnM7Q5oXUY9klIiGns15pdFYoOJb GqnNBexZs+qOeIxZlvlGbPZGFaMNDJ3AVu/5yYO55o+O46r+kzTXKra0bMJzP7ATLhW6 enoGaHw9EH6mfV8s1phjqef2X+lyxCTnVJ0hG8q1ywJ4WKcccTMQ0cCxJmWosL5GTIqp DUsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u126si15462989pgu.117.2019.06.03.08.54.15; Mon, 03 Jun 2019 08:54:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-spi-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-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729210AbfFCPyO (ORCPT + 1 other); Mon, 3 Jun 2019 11:54:14 -0400 Received: from foss.arm.com ([217.140.101.70]:53756 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729193AbfFCPvd (ORCPT ); Mon, 3 Jun 2019 11:51:33 -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 2554E1AED; Mon, 3 Jun 2019 08:51:33 -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 DD7383F246; Mon, 3 Jun 2019 08:51:31 -0700 (PDT) From: Suzuki K Poulose To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Mark Brown , linux-spi@vger.kernel.org Subject: [RFC PATCH 23/57] drivers: spi: Use bus_find_device_by_acpi_dev match helper Date: Mon, 3 Jun 2019 16:49:49 +0100 Message-Id: <1559577023-558-24-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-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Switch to the generic helper bus_find_device_by_acpi_dev. Cc: Mark Brown Cc: linux-spi@vger.kernel.org Signed-off-by: Suzuki K Poulose --- drivers/spi/spi.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.7.4 Acked-by: Mark Brown diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index ecdd602..5224ded 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -3634,11 +3634,6 @@ static int spi_acpi_controller_match(struct device *dev, const void *data) return ACPI_COMPANION(dev->parent) == data; } -static int spi_acpi_device_match(struct device *dev, void *data) -{ - return ACPI_COMPANION(dev) == data; -} - static struct spi_controller *acpi_spi_find_controller_by_adev(struct acpi_device *adev) { struct device *dev; @@ -3658,8 +3653,7 @@ static struct spi_device *acpi_spi_find_device_by_adev(struct acpi_device *adev) { struct device *dev; - dev = bus_find_device(&spi_bus_type, NULL, adev, spi_acpi_device_match); - + dev = bus_find_device(&spi_bus_type, NULL, adev, device_match_acpi_dev); return dev ? to_spi_device(dev) : NULL; }