Skip to content

Commit 66d8e76

Browse files
fschrempfbroonie
authored andcommitted
regulator: pca9450: Remove duplicate code in probe
The SD_VSEL GPIO is fetched twice for no reason. Remove the duplicate code. Signed-off-by: Frieder Schrempf <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 0a7c85b commit 66d8e76

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

drivers/regulator/pca9450-regulator.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,18 +1100,6 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
11001100
return ret;
11011101
}
11021102

1103-
/*
1104-
* For LDO5 we need to be able to check the status of the SD_VSEL input in
1105-
* order to know which control register is used. Most boards connect SD_VSEL
1106-
* to the VSELECT signal, so we can use the GPIO that is internally routed
1107-
* to this signal (if SION bit is set in IOMUX).
1108-
*/
1109-
pca9450->sd_vsel_gpio = gpiod_get_optional(&ldo5->dev, "sd-vsel", GPIOD_IN);
1110-
if (IS_ERR(pca9450->sd_vsel_gpio)) {
1111-
dev_err(&i2c->dev, "Failed to get SD_VSEL GPIO\n");
1112-
return ret;
1113-
}
1114-
11151103
dev_info(&i2c->dev, "%s probed.\n",
11161104
type == PCA9450_TYPE_PCA9450A ? "pca9450a" :
11171105
(type == PCA9450_TYPE_PCA9451A ? "pca9451a" : "pca9450bc"));

0 commit comments

Comments
 (0)