Message ID | 1559577023-558-43-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 q26csp4644870ili; Mon, 3 Jun 2019 08:52:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXlJUe7Ld0xirCjbAe5v1AcA/T4d90UqdJ4LtS7nG8iTJwNvHDvY+0ZiuDwXBEgWjbBEk8 X-Received: by 2002:a17:902:2aa6:: with SMTP id j35mr31611785plb.189.1559577126582; Mon, 03 Jun 2019 08:52:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577126; cv=none; d=google.com; s=arc-20160816; b=ErSf/Qz3TaHywu1ozFo8ImN1k7glb6zAAlyznw6xQgKQNw1akqgg2j/kOLkptzOV9v n2WJZqOvoIIGGJMLpmu1MfziM4npuzqQC9w/mFAForW/sTkfXMeNo3HwNFoOM7reGjOH 6ryXXsLhsUMNnwXpmqyW0skZKOt3oxopdddk0GXUhX/D8D5puor6Z7h8ZMycaWZ8oihT 4aTPCncQV8Jkga6L2msEwrNhA5j/eW1OeatGcWbxA9ixlUKwVeDwMjFdqJ6JJ8Qsb0B8 7MyzRDPBDPJU46CBb3NUm0GmRPkmiSkDlXdtAEQjSoPJm8kKYz0JmmVJwnLbiPunyhkW UsFQ== 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=3RHjltd/3Vt2ggfwF0P69vFaoYknmgUjuser8cp6LOk=; b=kihSKIx/gSgGbGD3Ba8VDNYG7s0vPoABj7z9r7d8er1iTe4mVDaDo9lJnsmihAoqsN 8D5QQzp7qVtKo0lY3KvMhoktourc6fuULLSYzU4gpLr9cze8yhrJn1CGNSo4furvr5HB bBVUfKTY+m9uuW1tgdM1xs7P0bTpr+fv2JfEReuy6dCD9amZDuU1VRqYuKPi1AaPPwkv VoBKqjic+8p5f7wbmyObBfoY5Uil+A5NsUqebgxnlAqwfiBofH+aehBtzSAX2evuUOvj QvH29nSYK/eosG32wQtoeULjiitr3nTNYOJGgLS1fPT9A/aBv2+d3AUsCzCXZHyy1m2V zaUg== 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 v20si19320578pgk.58.2019.06.03.08.52.06; Mon, 03 Jun 2019 08:52:06 -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 S1729508AbfFCPwF (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Mon, 3 Jun 2019 11:52:05 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53974 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729486AbfFCPwD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jun 2019 11:52:03 -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 2A5AB169E; Mon, 3 Jun 2019 08:52:03 -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 E25863F246; Mon, 3 Jun 2019 08:52:01 -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, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org> Subject: [RFC PATCH 42/57] drivers: regulator: Use class_find_device_by_of_node helper Date: Mon, 3 Jun 2019 16:50:08 +0100 Message-Id: <1559577023-558-43-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:50:08PM +0100, Suzuki K Poulose wrote: > Use the generic helper to find a device matching the of_node. Acked-by: Mark Brown <broonie@kernel.org> Please use subject lines matching the style for the subsystem. This makes it easier for people to identify relevant patches.
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 0ead116..1485f6e 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -442,16 +442,11 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev, return NULL; } -static int of_node_match(struct device *dev, const void *data) -{ - return dev->of_node == data; -} - struct regulator_dev *of_find_regulator_by_node(struct device_node *np) { struct device *dev; - dev = class_find_device(®ulator_class, NULL, np, of_node_match); + dev = class_find_device_by_of_node(®ulator_class, NULL, np); return dev ? dev_to_rdev(dev) : NULL; }
Use the generic helper to find a device matching the of_node. Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- drivers/regulator/of_regulator.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.7.4