ALSA: Add const prefix to proc helper functions
authorTakashi Iwai <tiwai@suse.de>
Tue, 8 Sep 2009 12:29:58 +0000 (14:29 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 8 Sep 2009 12:45:06 +0000 (14:45 +0200)
Add appropriate const prefix to char * arguments in proc helper functions.
Also fixed the caller side to be proper const pointers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/info.h
sound/core/info.c
sound/core/oss/mixer_oss.c
sound/core/oss/pcm_oss.c

index 7c2ee1a21b00b05a8476c168d737a009ba1fce57..112e8949e1a7d020af20607acc9609d14a066fb3 100644 (file)
@@ -110,13 +110,13 @@ void snd_card_info_read_oss(struct snd_info_buffer *buffer);
 static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {}
 #endif
 
-int snd_iprintf(struct snd_info_buffer *buffer, char *fmt, ...) \
+int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...) \
                                __attribute__ ((format (printf, 2, 3)));
 int snd_info_init(void);
 int snd_info_done(void);
 
 int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len);
-char *snd_info_get_str(char *dest, char *src, int len);
+const char *snd_info_get_str(char *dest, const char *src, int len);
 struct snd_info_entry *snd_info_create_module_entry(struct module *module,
                                               const char *name,
                                               struct snd_info_entry *parent);
index 35df614f6c5599329a403beb7295f3ffe3a51d2e..6eb53930ea1ddb34d635661a7ca0c97df9fe458e 100644 (file)
@@ -108,7 +108,7 @@ static int resize_info_buffer(struct snd_info_buffer *buffer,
  *
  * Returns the size of output string.
  */
-int snd_iprintf(struct snd_info_buffer *buffer, char *fmt,...)
+int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...)
 {
        va_list args;
        int len, res;
@@ -727,7 +727,7 @@ EXPORT_SYMBOL(snd_info_get_line);
  * Returns the updated pointer of the original string so that
  * it can be used for the next call.
  */
-char *snd_info_get_str(char *dest, char *src, int len)
+const char *snd_info_get_str(char *dest, const char *src, int len)
 {
        int c;
 
index 5dcd8a526970002bb1113d6cd16f9c9b2cc30f27..772423889eb37e25d95a775d798979c5a46cfa33 100644 (file)
@@ -1154,7 +1154,8 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
                                     struct snd_info_buffer *buffer)
 {
        struct snd_mixer_oss *mixer = entry->private_data;
-       char line[128], str[32], idxstr[16], *cptr;
+       char line[128], str[32], idxstr[16];
+       const char *cptr;
        int ch, idx;
        struct snd_mixer_oss_assign_table *tbl;
        struct slot *slot;
index dbe406b82591058dd515686d8d13eb800418b416..d8b2d76125b437ec66ca324181173c5553fd1f63 100644 (file)
@@ -2836,7 +2836,8 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry,
                                   struct snd_info_buffer *buffer)
 {
        struct snd_pcm_str *pstr = entry->private_data;
-       char line[128], str[32], task_name[32], *ptr;
+       char line[128], str[32], task_name[32];
+       const char *ptr;
        int idx1;
        struct snd_pcm_oss_setup *setup, *setup1, template;