diff mbox

[RFC] sgtl5000: check VDDD-supply instead of revision

Message ID VI1PR0401MB204745C966DF72A027440647E3460@VI1PR0401MB2047.eurprd04.prod.outlook.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fabio Estevam May 31, 2016, 5:58 p.m. UTC
[Sorry for the top-post]

I think this makes sense. Please submit a formal patch, thanks.
diff mbox

Patch

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 08b4046..fbad4fb 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1286,17 +1286,14 @@  static int sgtl5000_enable_regulators(struct snd_soc_codec *codec)
        for (i = 0; i < ARRAY_SIZE(sgtl5000->supplies); i++)
                sgtl5000->supplies[i].supply = supply_names[i];

-       /* External VDDD only works before revision 0x11 */
-       if (sgtl5000->revision < 0x11) {
-               vddd = regulator_get_optional(codec->dev, "VDDD");
-               if (IS_ERR(vddd)) {
-                       /* See if it's just not registered yet */
-                       if (PTR_ERR(vddd) == -EPROBE_DEFER)
-                               return -EPROBE_DEFER;
-               } else {
-                       external_vddd = 1;
-                       regulator_put(vddd);
-               }
+       vddd = regulator_get_optional(codec->dev, "VDDD");
+       if (IS_ERR(vddd)) {
+               /* See if it's just not registered yet */
+               if (PTR_ERR(vddd) == -EPROBE_DEFER)
+                       return -EPROBE_DEFER;
+       } else {
+               external_vddd = 1;
+               regulator_put(vddd);
        }

        if (!external_vddd) {