* [PATCH] ASoC: Remove bogus check for register validity in debugfs write
@ 2011-03-16 18:19 Mark Brown
2011-03-18 9:36 ` Liam Girdwood
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2011-03-16 18:19 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown
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>
---
sound/soc/soc-core.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 17efacd..4dda589 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -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))
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: Remove bogus check for register validity in debugfs write
2011-03-16 18:19 [PATCH] ASoC: Remove bogus check for register validity in debugfs write Mark Brown
@ 2011-03-18 9:36 ` Liam Girdwood
0 siblings, 0 replies; 2+ messages in thread
From: Liam Girdwood @ 2011-03-18 9:36 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, patches
On Wed, 2011-03-16 at 18:19 +0000, Mark Brown wrote:
> 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@ti.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-18 9:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-16 18:19 [PATCH] ASoC: Remove bogus check for register validity in debugfs write Mark Brown
2011-03-18 9:36 ` Liam Girdwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).