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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 24 Mar 2015 13:08:02 +0100
From:	Markus Pargmann <mpa@...gutronix.de>
To:	Mark Brown <broonie@...nel.org>
Cc:	Liam Girdwood <lgirdwood@...il.com>,
	Wolfram Sang <wsa@...-dreams.de>, kernel@...gutronix.de,
	linux-kernel@...r.kernel.org, Markus Pargmann <mpa@...gutronix.de>
Subject: [PATCH 1/2] regulator: max8660: Remove boot_on handling

boot_on is handled by the regulator core. It will call enable() on the
regulators that are specified to be boot_on. So we don't require any
additional handling in this driver

Signed-off-by: Markus Pargmann <mpa@...gutronix.de>
---
 drivers/regulator/max8660.c | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c
index 7eee2ca18541..32cf277a7662 100644
--- a/drivers/regulator/max8660.c
+++ b/drivers/regulator/max8660.c
@@ -385,7 +385,7 @@ static int max8660_probe(struct i2c_client *client,
 	struct max8660_platform_data *pdata = dev_get_platdata(dev);
 	struct regulator_config config = { };
 	struct max8660 *max8660;
-	int boot_on, i, id, ret = -EINVAL;
+	int i, id, ret = -EINVAL;
 	struct device_node *of_node[MAX8660_V_END];
 	unsigned long type;
 
@@ -441,39 +441,21 @@ static int max8660_probe(struct i2c_client *client,
 		max8660->shadow_regs[MAX8660_MDTV2] = 0x04;
 
 	for (i = 0; i < pdata->num_subdevs; i++) {
-
 		if (!pdata->subdevs[i].platform_data)
-			return ret;
-
-		boot_on = pdata->subdevs[i].platform_data->constraints.boot_on;
+			return -EINVAL;
 
 		switch (pdata->subdevs[i].id) {
 		case MAX8660_V3:
-			if (boot_on)
-				max8660->shadow_regs[MAX8660_OVER1] |= 1;
-			break;
-
 		case MAX8660_V4:
-			if (boot_on)
-				max8660->shadow_regs[MAX8660_OVER1] |= 4;
-			break;
-
 		case MAX8660_V5:
-			break;
-
 		case MAX8660_V6:
-			if (boot_on)
-				max8660->shadow_regs[MAX8660_OVER2] |= 2;
 			break;
-
 		case MAX8660_V7:
 			if (type == MAX8661) {
 				dev_err(dev, "Regulator not on this chip!\n");
 				return -EINVAL;
 			}
 
-			if (boot_on)
-				max8660->shadow_regs[MAX8660_OVER2] |= 4;
 			break;
 
 		default:
-- 
2.1.4

--
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