Skip to contentSkip to conversation

ASoC: Remove unused step size from debugfs CODEC write function

PATCH In review Mark Brown 2 participants 3 messages Sep 7, 2011 – Sep 8, 2011

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: Remove unused step size from debugfs CODEC write function

We don't use the step size so there's no need to work it out.

---
 sound/soc/soc-core.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
sound/soc/soc-core.c +0 -4
index 187ddfd..0f41cd9 100644
@@ -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);
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 30 lines · Mark Brown

We don't use the step size so there's no need to work it out.

---
 sound/soc/soc-core.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
sound/soc/soc-core.c +0 -5
index 187ddfd..0f41cd9 100644
@@ -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);
--
Quoted 3 lines

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 <[email protected]>

author
#2 lore raw
Quoted 2 lines · Liam

Btw, we should probably remove this from the struct codec_driver if there are no other users.

It's used for displaying the register map, it's just write where it's not needed.