[alsa-devel] [PATCH] ASoC: Remove unused step size from debugfs CODEC write function

Girdwood, Liam lrg at ti.com
Thu Sep 8 23:19:18 CEST 2011


On 7 September 2011 00:40, Mark Brown
<broonie at opensource.wolfsonmicro.com>wrote:

> We don't use the step size so there's no need to work it out.
>
> Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
> ---
>  sound/soc/soc-core.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index 187ddfd..0f41cd9 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -244,7 +244,6 @@ static ssize_t codec_reg_write_file(struct file *file,
>        size_t buf_size;
>        char *start = buf;
>        unsigned long reg, value;
> -       int step = 1;
>        struct snd_soc_codec *codec = file->private_data;
>
>        buf_size = min(count, (sizeof(buf)-1));
> @@ -252,9 +251,6 @@ static ssize_t codec_reg_write_file(struct file *file,
>                return -EFAULT;
>        buf[buf_size] = 0;
>
> -       if (codec->driver->reg_cache_step)
> -               step = codec->driver->reg_cache_step;
> -
>        while (*start == ' ')
>                start++;
>        reg = simple_strtoul(start, &start, 16);
> --
> 1.7.5.4
>
>
Btw, we should probably remove this from the struct codec_driver if there
are no other users.

Acked-by Liam Girdwood <lrg at ti.com>


More information about the Alsa-devel mailing list