lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1401297069-7423-3-git-send-email-maxime.ripard@free-electrons.com>
Date:	Wed, 28 May 2014 19:11:06 +0200
From:	Maxime Ripard <maxime.ripard@...e-electrons.com>
To:	carlo@...one.org, Boris Brezillon <boris@...e-electrons.com>,
	Mark Brown <broonie@...nel.org>, lgirdwood@...il.com,
	lee.jones@...aro.org
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	kevin.z.m.zh@...il.com, sunny@...winnertech.com,
	shuge@...winnertech.com, zhuzhenhua@...winnertech.com,
	Maxime Ripard <maxime.ripard@...e-electrons.com>
Subject: [PATCH 2/5] regulator: Pass the config device node to regulator_dev_lookup

For now, regulator registers only looks for parent supplies in the struct
device of_node.

That means that single devices that expose several regulators in the DT have to
tie the parent supplies to the parent device, instead of the regulator itself
like described in the regulator bindings.

The regulator device node is already present in the regulator_config structure
that is passed to regulator_register. Use it to first match in the regulator
node, and then to the device node itself.

Signed-off-by: Maxime Ripard <maxime.ripard@...e-electrons.com>
---
 drivers/regulator/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 3e3954252a23..c8e26be5ea01 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3503,7 +3503,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
 	if (supply) {
 		struct regulator_dev *r;
 
-		r = regulator_dev_lookup(dev, NULL, supply, &ret);
+		r = regulator_dev_lookup(dev, config->of_node, supply, &ret);
 
 		if (ret == -ENODEV) {
 			/*
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ