Skip to contentSkip to conversation

alsa: snd_pcm_new api cleanup

PATCH In review Tim Blechmann 2 participants 5 messages Feb 5, 2009 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsa: snd_pcm_new api cleanup

Impact: cleanup

snd_pcm_new takes a char *id argument, although it is not modifying the string. it can therefore be declared as const char *id.

---
 sound/core/pcm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/core/pcm.c +1 -1
index 192a433..583453e 100644
@@ -692,7 +692,7 @@ EXPORT_SYMBOL(snd_pcm_new_stream);
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_pcm_new(struct snd_card *card, char *id, int device,
+int snd_pcm_new(struct snd_card *card, const char *id, int device,
 		int playback_count, int capture_count,
 	        struct snd_pcm ** rpcm)
 {
Signature · 1 line
1.5.6.3
#1 lore raw

At Thu, 5 Feb 2009 12:27:15 +0100,

Quoted 16 lines · Tim Blechmann

Impact: cleanup

snd_pcm_new takes a char *id argument, although it is not modifying the string. it can therefore be declared as const char *id.

---
 sound/core/pcm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/core/pcm.c +0 -0
index 192a433..583453e 100644

sound/core/pcm.c EXPORT_SYMBOL(snd_pcm_new_stream); · line 698

Quoted 8 lines
sound/core/pcm.c +1 -1
@@ -692,7 +692,7 @@ EXPORT_SYMBOL(snd_pcm_new_stream);
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_pcm_new(struct snd_card *card, char *id, int device,
+int snd_pcm_new(struct snd_card *card, const char *id, int device,
 		int playback_count, int capture_count,
 	        struct snd_pcm ** rpcm)
 {

Don't forget to fix include/sound/pcm.h, too.

Or, more better, please test the build once before submitting patches :)

thanks,

Takashi

#2 lore raw

PATCH 1/1 alsa: snd_pcm_new api cleanup

Impact: cleanup

snd_pcm_new takes a char *id argument, although it is not modifying the string. it can therefore be declared as const char *id.

---
 include/sound/pcm.h |    2 +-
 sound/core/pcm.c    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/sound/pcm.h +1 -1
index 40c5a6f..ee0e887 100644
@@ -451,7 +451,7 @@ struct snd_pcm_notify {
 
 extern const struct file_operations snd_pcm_f_ops[2];
 
-int snd_pcm_new(struct snd_card *card, char *id, int device,
+int snd_pcm_new(struct snd_card *card, const char *id, int device,
 		int playback_count, int capture_count,
 		struct snd_pcm **rpcm);
 int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count);
sound/core/pcm.c +1 -1
index 192a433..583453e 100644
@@ -692,7 +692,7 @@ EXPORT_SYMBOL(snd_pcm_new_stream);
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_pcm_new(struct snd_card *card, char *id, int device,
+int snd_pcm_new(struct snd_card *card, const char *id, int device,
 		int playback_count, int capture_count,
 	        struct snd_pcm ** rpcm)
 {
Signature · 1 line
1.5.6.3
#3 lore raw

At Thu, 5 Feb 2009 13:01:54 +0100,

Quoted 7 lines · Tim Blechmann

Impact: cleanup

snd_pcm_new takes a char *id argument, although it is not modifying the string. it can therefore be declared as const char *id.

Applied now. Thanks.

Takashi

#4 lore raw
In reply to Takashi Iwai
Quoted 3 lines

Don't forget to fix include/sound/pcm.h, too.

Or, more better, please test the build once before submitting patches :)

hrm, compiled wrong source tree :/

best, tim

Signature · 5 lines
[email protected]
http://tim.klingt.org

The composer makes plans, music laughs.
  Morton Feldman

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