Commit b12d1e4f authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branch 'asoc/fix/component' into asoc-linus

parents 3eb2ce82 dead99e8
...@@ -88,19 +88,16 @@ static int snd_soc_component_update_bits_legacy( ...@@ -88,19 +88,16 @@ static int snd_soc_component_update_bits_legacy(
unsigned int old, new; unsigned int old, new;
int ret; int ret;
if (!component->read || !component->write)
return -EIO;
mutex_lock(&component->io_mutex); mutex_lock(&component->io_mutex);
ret = component->read(component, reg, &old); ret = snd_soc_component_read(component, reg, &old);
if (ret < 0) if (ret < 0)
goto out_unlock; goto out_unlock;
new = (old & ~mask) | (val & mask); new = (old & ~mask) | (val & mask);
*change = old != new; *change = old != new;
if (*change) if (*change)
ret = component->write(component, reg, new); ret = snd_soc_component_write(component, reg, new);
out_unlock: out_unlock:
mutex_unlock(&component->io_mutex); mutex_unlock(&component->io_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment