Explorar o código

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.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tim Blechmann %!s(int64=16) %!d(string=hai) anos
pai
achega
e616165309
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      include/sound/pcm.h
  2. 1 1
      sound/core/pcm.c

+ 1 - 1
include/sound/pcm.h

@@ -451,7 +451,7 @@ struct snd_pcm_notify {
 
 
 extern const struct file_operations snd_pcm_f_ops[2];
 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,
 		int playback_count, int capture_count,
 		struct snd_pcm **rpcm);
 		struct snd_pcm **rpcm);
 int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count);
 int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count);

+ 1 - 1
sound/core/pcm.c

@@ -692,7 +692,7 @@ EXPORT_SYMBOL(snd_pcm_new_stream);
  *
  *
  * Returns zero if successful, or a negative error code on failure.
  * 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,
 		int playback_count, int capture_count,
 	        struct snd_pcm ** rpcm)
 	        struct snd_pcm ** rpcm)
 {
 {