Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tim Blechmann and committed by
Takashi Iwai
e6161653 cade9f8a

+2 -2
+1 -1
include/sound/pcm.h
··· 451 451 452 452 extern const struct file_operations snd_pcm_f_ops[2]; 453 453 454 - int snd_pcm_new(struct snd_card *card, char *id, int device, 454 + int snd_pcm_new(struct snd_card *card, const char *id, int device, 455 455 int playback_count, int capture_count, 456 456 struct snd_pcm **rpcm); 457 457 int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count);
+1 -1
sound/core/pcm.c
··· 692 692 * 693 693 * Returns zero if successful, or a negative error code on failure. 694 694 */ 695 - int snd_pcm_new(struct snd_card *card, char *id, int device, 695 + int snd_pcm_new(struct snd_card *card, const char *id, int device, 696 696 int playback_count, int capture_count, 697 697 struct snd_pcm ** rpcm) 698 698 {