Message ID | 1559577023-558-27-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 q26csp4644460ili; Mon, 3 Jun 2019 08:51:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiqP8ehbhC1yJ0hTDr+V8n7Nn/Kh9XeA42rScwYHKz2XAuILpeZT+Sj5wxMmz095oIRJ/g X-Received: by 2002:aa7:8296:: with SMTP id s22mr31979868pfm.52.1559577102550; Mon, 03 Jun 2019 08:51:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577102; cv=none; d=google.com; s=arc-20160816; b=iFEkWIZw1/zcY24iBP4s50h0DqrQpOJLFeofss6cDRgO2dL5p4vLA3CB0GHKRNm7dR EzFqp0Yx+01Tfz3AtxMUF7uXxjaF+aymTujI2+RYuHx9HmmD/VumV/jt35KI9YJfPFXf Fy5iPLyaexlPI9C4zBzrQ6iqZj58V95utb4fEtK5dbR9riA98pw481RqEmOJkufQj73y 2K9uVYCJ/s9BlZTuXUFGCUaQlNW1+z54mv3/riZaJIqPbRPwgLKi3UaRWszqDQZFZX1j BT1FzpqaIhu+8o1sVPp2FO3oSfOxYvU+bWa/UMIlvfn6HijZi2mZrUUafQGxzYXezm6R o2og== 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=g2Vzl84NcQ49tv5c7zwRIv+4dtN+kHd9o2wAEcFYHJI=; b=RK2TPk4amd/eRi7gDQwMlpLJIls/GHMC986Eqgwi7FFoKBFo5moDG5QrL2m0oLN11e kfooeqUY7OADBaQni+pdhMzAW/kQaIOftiLwGriHPii6so0cm72psUxUJkRdigRXpqd2 LRgiUyVqBmz6ryn/2Fd5HYoGvKshgGvJmJK1NfYbn/n3ZVIVVn7wWyiT6zBS/rouZgAV QawfoBV4SIY10MYrpi9aPW+Z5YLOtCOQR++mUtHSBsiHNx9r6brjz2BojRGpyW7yZ8Ot g16gRlv3o9ynvpuXQGhKs8WfamV1kJLm+dae/ULd8v/Cl5Lm9ceyAg0na4Y8lcrjKHLt omsQ== 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 n2si13824126pgq.129.2019.06.03.08.51.42; Mon, 03 Jun 2019 08:51:42 -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 S1729329AbfFCPvl (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Mon, 3 Jun 2019 11:51:41 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53778 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729282AbfFCPvh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jun 2019 11:51:37 -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 1FE811A25; Mon, 3 Jun 2019 08:51:37 -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 BDC213F246; Mon, 3 Jun 2019 08:51:35 -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, "Rafael J. Wysocki" <rjw@rjwysocki.net>, Len Brown <lenb@kernel.org>, linux-acpi@vger.kernel.org Subject: [RFC PATCH 26/57] drivers: acpi: Clean up acpi_dev_match_cb Date: Mon, 3 Jun 2019 16:49:52 +0100 Message-Id: <1559577023-558-27-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/acpi/utils.c b/drivers/acpi/utils.c index 7def63a..1391b63 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -725,8 +725,6 @@ bool acpi_dev_found(const char *hid) EXPORT_SYMBOL(acpi_dev_found); struct acpi_dev_match_info { - const char *dev_name; - struct acpi_device *adev; struct acpi_device_id hid[2]; const char *uid; s64 hrv; @@ -746,9 +744,6 @@ static int acpi_dev_match_cb(struct device *dev, void *data) strcmp(adev->pnp.unique_id, match->uid))) return 0; - match->dev_name = acpi_dev_name(adev); - match->adev = adev; - if (match->hrv == -1) return 1; @@ -818,7 +813,7 @@ acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv) match.hrv = hrv; dev = bus_find_device(&acpi_bus_type, NULL, &match, acpi_dev_match_cb); - return dev ? match.adev : NULL; + return dev ? to_acpi_device(dev) : NULL; } EXPORT_SYMBOL(acpi_dev_get_first_match_dev);
acpi_dev_match_cb match function modifies the "data" argument to pass on a result which could be easily deduced from the result of the bus_find_device() call at the caller site. Clean this up in preparation to convert the "match" argument for bus_find_device. Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Len Brown <lenb@kernel.org> Cc: linux-acpi@vger.kernel.org Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- drivers/acpi/utils.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.7.4