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-next>] [day] [month] [year] [list]
Message-ID: <20250219080152.11883-1-frieder@fris.de>
Date: Wed, 19 Feb 2025 09:01:48 +0100
From: Frieder Schrempf <frieder@...s.de>
To: linux-arm-kernel@...ts.infradead.org,
	Liam Girdwood <lgirdwood@...il.com>,
	linux-kernel@...r.kernel.org,
	Mark Brown <broonie@...nel.org>
Cc: Frieder Schrempf <frieder.schrempf@...tron.de>,
	Bo Liu <liubo03@...pur.com>,
	Frank Li <Frank.Li@....com>,
	Joy Zou <joy.zou@....com>,
	Marek Vasut <marex@...x.de>,
	Robin Gong <yibin.gong@....com>
Subject: [PATCH] regulator: pca9450: Remove duplicate code in probe

From: Frieder Schrempf <frieder.schrempf@...tron.de>

The SD_VSEL GPIO is fetched twice for no reason. Remove the
duplicate code.

Signed-off-by: Frieder Schrempf <frieder.schrempf@...tron.de>
---
Apparently something went wrong when preparing the v3 patch
that got applied to regulator/for-next and is now in linux-next.
---
 drivers/regulator/pca9450-regulator.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c
index 4519e725706cd..8f81d813640d9 100644
--- a/drivers/regulator/pca9450-regulator.c
+++ b/drivers/regulator/pca9450-regulator.c
@@ -1100,18 +1100,6 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
 		return ret;
 	}
 
-	/*
-	 * For LDO5 we need to be able to check the status of the SD_VSEL input in
-	 * order to know which control register is used. Most boards connect SD_VSEL
-	 * to the VSELECT signal, so we can use the GPIO that is internally routed
-	 * to this signal (if SION bit is set in IOMUX).
-	 */
-	pca9450->sd_vsel_gpio = gpiod_get_optional(&ldo5->dev, "sd-vsel", GPIOD_IN);
-	if (IS_ERR(pca9450->sd_vsel_gpio)) {
-		dev_err(&i2c->dev, "Failed to get SD_VSEL GPIO\n");
-		return ret;
-	}
-
 	dev_info(&i2c->dev, "%s probed.\n",
 		type == PCA9450_TYPE_PCA9450A ? "pca9450a" :
 		(type == PCA9450_TYPE_PCA9451A ? "pca9451a" : "pca9450bc"));
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ