]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
regulator: pca9450: Remove duplicate code in probe
authorFrieder Schrempf <frieder.schrempf@kontron.de>
Wed, 19 Feb 2025 08:01:48 +0000 (09:01 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 19 Feb 2025 14:33:11 +0000 (14:33 +0000)
The SD_VSEL GPIO is fetched twice for no reason. Remove the
duplicate code.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Link: https://patch.msgid.link/20250219080152.11883-1-frieder@fris.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/pca9450-regulator.c

index 4519e725706cd205a5a978e5f0ae2a20ac7f2fc5..8f81d813640d9dbf4c8198fcadee400da9917644 100644 (file)
@@ -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"));