Skip to contentSkip to conversation

ALSA: ASoC: Remove const attribute from lm49453's snd_soc_dai_driver

PATCH In review Daniel Mack 3 participants 7 messages Jun 27, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: ASoC: Remove const attribute from lm49453's snd_soc_dai_driver

Fixes the following build warning.

CC sound/soc/codecs/lm49453.o
sound/soc/codecs/lm49453.c: In function ‘lm49453_i2c_probe’:
sound/soc/codecs/lm49453.c:1511:24: warning: passing argument 3 of ‘snd_soc_register_codec’ discards qualifiers from pointer target type include/sound/soc.h:333:5: note: expected ‘struct snd_soc_dai_driver *’ but argument is of type ‘const struct snd_soc_dai_driver *’

---
 sound/soc/codecs/lm49453.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/lm49453.c +1 -1
index 802b9f1..5bd1294 100644
@@ -1358,7 +1358,7 @@ static struct snd_soc_dai_ops lm49453_lineout_dai_ops = {
 };
 
 /* LM49453 dai structure. */
-static const struct snd_soc_dai_driver lm49453_dai[] = {
+static struct snd_soc_dai_driver lm49453_dai[] = {
 	{
 		.name = "LM49453 Headset",
 		.playback = {
Signature · 6 lines
1.7.10.2

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#1 lore raw
Quoted 4 lines · Daniel Mack

Fixes the following build warning.

CC sound/soc/codecs/lm49453.o
sound/soc/codecs/lm49453.c: In function ‘lm49453_i2c_probe’:

This has been fixed for about a month...

#2 lore raw
Quoted 8 lines · Mark Brown
Quoted 4 lines · Daniel Mack

Fixes the following build warning.

CC sound/soc/codecs/lm49453.o
sound/soc/codecs/lm49453.c: In function ‘lm49453_i2c_probe’:

This has been fixed for about a month...

Ah, ok, thanks. It's just not in Linus' tree yet, and I got the warning while building a 3.5-rc4.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=sound/soc/codecs/lm49453.c;hb=HEAD#l1361

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#3 lore raw
In reply to Mark Brown

At Wed, 27 Jun 2012 11:17:51 +0100,

Quoted 8 lines · Mark Brown
Quoted 4 lines · Daniel Mack

Fixes the following build warning.

CC sound/soc/codecs/lm49453.o
sound/soc/codecs/lm49453.c: In function ‘lm49453_i2c_probe’:

This has been fixed for about a month...

Could you put it in the next pull request?
It's not fixed in the upstream yet.

Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#4 lore raw
Quoted 2 lines · Takashi Iwai

Could you put it in the next pull request?
It's not fixed in the upstream yet.

It's fixed in -next, not in for-3.5. I guess I'll pick the change over at some point.

#5 lore raw

At Wed, 27 Jun 2012 12:11:21 +0100,

Quoted 8 lines · Mark Brown
Quoted 2 lines · Takashi Iwai

Could you put it in the next pull request?
It's not fixed in the upstream yet.

It's fixed in -next, not in for-3.5. I guess I'll pick the change over at some point.

Hm, OK.

Ideally, such a problem should have been fixed for 3.5 by just removing const, and add const again once after ASoC core is changed for 3.6. But I've been ignoring this warning since it's certainly no big issue.

Takashi

#6 lore raw
Quoted 9 lines · Takashi Iwai
Quoted 2 lines · Mark Brown

It's fixed in -next, not in for-3.5. I guess I'll pick the change over at some point.

Ideally, such a problem should have been fixed for 3.5 by just removing const, and add const again once after ASoC core is changed for 3.6. But I've been ignoring this warning since it's certainly no big issue.

The fix in -next is to remove the const, it's not simply a case of adding the const in the core as we currently fiddle with the ops structs to add default ops (which we shouldn't do).