diff options
author | Mark Brown <broonie@kernel.org> | 2020-07-31 19:54:03 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-07-31 19:54:03 +0100 |
commit | 84569f329f7fcb40b7b1860f273b2909dabf2a2b (patch) | |
tree | cd332fbb2947f20cc06e3b80da75b189c8ac624e /sound/soc/soc-ac97.c | |
parent | c8f7dbdbaa15c700ea02abf92b8d9bda2e91050b (diff) | |
parent | 8e34f1e867b572f1e20b5250c2897fe5f041c99f (diff) | |
download | linux-84569f329f7fcb40b7b1860f273b2909dabf2a2b.tar.bz2 |
Merge remote-tracking branch 'asoc/for-5.9' into asoc-next
Diffstat (limited to 'sound/soc/soc-ac97.c')
-rw-r--r-- | sound/soc/soc-ac97.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/soc-ac97.c b/sound/soc/soc-ac97.c index c086786e4471..65db083e242b 100644 --- a/sound/soc/soc-ac97.c +++ b/sound/soc/soc-ac97.c @@ -82,13 +82,12 @@ static int snd_soc_ac97_gpio_get(struct gpio_chip *chip, unsigned offset) struct snd_soc_component *component = gpio_to_component(chip); int ret; - if (snd_soc_component_read(component, AC97_GPIO_STATUS, &ret) < 0) - ret = -1; + ret = snd_soc_component_read(component, AC97_GPIO_STATUS); dev_dbg(component->dev, "get gpio %d : %d\n", offset, - ret < 0 ? ret : ret & (1 << offset)); + ret & (1 << offset)); - return ret < 0 ? ret : !!(ret & (1 << offset)); + return !!(ret & (1 << offset)); } static void snd_soc_ac97_gpio_set(struct gpio_chip *chip, unsigned offset, @@ -394,6 +393,8 @@ EXPORT_SYMBOL_GPL(snd_soc_set_ac97_ops); /** * snd_soc_set_ac97_ops_of_reset - Set ac97 ops with generic ac97 reset functions + * @ops: bus ops + * @pdev: platform device * * This function sets the reset and warm_reset properties of ops and parses * the device node of pdev to get pinctrl states and gpio numbers to use. |