Skip to content

Commit 8e84937

Browse files
committed
Revert part of pbp-support sound/soc/soc-jack.c 0dbe662
1 parent 050e36c commit 8e84937

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

sound/soc/soc-jack.c

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -344,24 +344,9 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
344344
goto undo;
345345
}
346346
} else {
347-
int flags = GPIOF_IN;
348-
if (gpios[i].invert)
349-
flags |= GPIOF_ACTIVE_LOW;
350-
/* legacy GPIO number */
351-
if (!gpio_is_valid(gpios[i].gpio)) {
352-
dev_err(jack->card->dev,
353-
"ASoC: Invalid gpio %d\n",
354-
gpios[i].gpio);
355-
ret = -EINVAL;
356-
goto undo;
357-
}
358-
359-
ret = gpio_request_one(gpios[i].gpio, flags,
360-
gpios[i].name);
361-
if (ret)
362-
goto undo;
363-
364-
gpios[i].desc = gpio_to_desc(gpios[i].gpio);
347+
dev_err(jack->card->dev, "ASoC: Invalid gpio at index %d\n", i);
348+
ret = -EINVAL;
349+
goto undo;
365350
}
366351
got_gpio:
367352
INIT_DELAYED_WORK(&gpios[i].work, gpio_work);

0 commit comments

Comments
 (0)