aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-03-28 10:23:16 +0800
committerMark Brown <broonie@kernel.org>2018-03-28 10:23:16 +0800
commitb12d1e4fbbbb28379df53acc5a993cf42a0ce552 (patch)
tree496cf0648459f56e6f286e90acd49b220705a34a
parentLinux 4.16-rc7 (diff)
parentASoC: soc-io: Fix snd_soc_component_update_bits_legacy (diff)
downloadwireguard-linux-b12d1e4fbbbb28379df53acc5a993cf42a0ce552.tar.xz
wireguard-linux-b12d1e4fbbbb28379df53acc5a993cf42a0ce552.zip
Merge remote-tracking branch 'asoc/fix/component' into asoc-linus
-rw-r--r--sound/soc/soc-io.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c
index 2bc1c4c17896..d36a192fbece 100644
--- a/sound/soc/soc-io.c
+++ b/sound/soc/soc-io.c
@@ -88,19 +88,16 @@ static int snd_soc_component_update_bits_legacy(
unsigned int old, new;
int ret;
- if (!component->read || !component->write)
- return -EIO;
-
mutex_lock(&component->io_mutex);
- ret = component->read(component, reg, &old);
+ ret = snd_soc_component_read(component, reg, &old);
if (ret < 0)
goto out_unlock;
new = (old & ~mask) | (val & mask);
*change = old != new;
if (*change)
- ret = component->write(component, reg, new);
+ ret = snd_soc_component_write(component, reg, new);
out_unlock:
mutex_unlock(&component->io_mutex);