]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/regulator/max8952.c
Merge tag 'mips_fixes_5.1_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
[linux.git] / drivers / regulator / max8952.c
index 6c39fff73b8acd61c57cb3fc7fc13c3af7a64bdc..cf2a2912cb1bcdeebc00c4c711c732acc9469f9a 100644 (file)
@@ -231,9 +231,13 @@ static int max8952_pmic_probe(struct i2c_client *client,
        else
                gflags = GPIOD_OUT_LOW;
        gflags |= GPIOD_FLAGS_BIT_NONEXCLUSIVE;
-       gpiod = devm_gpiod_get_optional(&client->dev,
-                                       "max8952,en",
-                                       gflags);
+       /*
+        * Do not use devm* here: the regulator core takes over the
+        * lifecycle management of the GPIO descriptor.
+        */
+       gpiod = gpiod_get_optional(&client->dev,
+                                  "max8952,en",
+                                  gflags);
        if (IS_ERR(gpiod))
                return PTR_ERR(gpiod);
        if (gpiod)