Skip to content

Commit

Permalink
ASoC: Remove bogus check for register validity in debugfs write
Browse files Browse the repository at this point in the history
Since not all registers need to be cached and the cache is entirely
optional anyway we shouldn't be checking that a register is in the
cached range. If the register is invalid then the actual I/O code
can determine that and report an error.

Similarly, the step size can and should be enforced by the lower level
code if it's important.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
  • Loading branch information
Mark Brown committed Mar 18, 2011
1 parent 2a3887f commit b1a56b3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ static ssize_t codec_reg_write_file(struct file *file,
while (*start == ' ')
start++;
reg = simple_strtoul(start, &start, 16);
if ((reg >= codec->driver->reg_cache_size) || (reg % step))
return -EINVAL;
while (*start == ' ')
start++;
if (strict_strtoul(start, 16, &value))
Expand Down

0 comments on commit b1a56b3

Please sign in to comment.