[ALSA] Add const prefix
authorTakashi Iwai <tiwai@suse.de>
Mon, 13 Jun 2005 12:13:09 +0000 (14:13 +0200)
committerJaroslav Kysela <perex@suse.cz>
Wed, 22 Jun 2005 10:28:54 +0000 (12:28 +0200)
Control Midlevel
Add const prefix to snd_kcontrol_new_t pointer for better protection.

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

index 7b9444cd02f400af4242f21c38db416ea4da02da..ef7903c7a3277b63d7860d8c6c9d18bbb9e9230d 100644 (file)
@@ -106,7 +106,7 @@ typedef int (*snd_kctl_ioctl_func_t) (snd_card_t * card,
 void snd_ctl_notify(snd_card_t * card, unsigned int mask, snd_ctl_elem_id_t * id);
 
 snd_kcontrol_t *snd_ctl_new(snd_kcontrol_t * kcontrol, unsigned int access);
-snd_kcontrol_t *snd_ctl_new1(snd_kcontrol_new_t * kcontrolnew, void * private_data);
+snd_kcontrol_t *snd_ctl_new1(const snd_kcontrol_new_t * kcontrolnew, void * private_data);
 void snd_ctl_free_one(snd_kcontrol_t * kcontrol);
 int snd_ctl_add(snd_card_t * card, snd_kcontrol_t * kcontrol);
 int snd_ctl_remove(snd_card_t * card, snd_kcontrol_t * kcontrol);
index 4e39a2103d0a4e47f0a13d361659aeb1e4bc8bbb..227f3cf02771605d11e8ddd32c565bc902d75d7d 100644 (file)
@@ -215,7 +215,7 @@ snd_kcontrol_t *snd_ctl_new(snd_kcontrol_t * control, unsigned int access)
  *
  * Returns the pointer of the newly generated instance, or NULL on failure.
  */
-snd_kcontrol_t *snd_ctl_new1(snd_kcontrol_new_t * ncontrol, void *private_data)
+snd_kcontrol_t *snd_ctl_new1(const snd_kcontrol_new_t * ncontrol, void *private_data)
 {
        snd_kcontrol_t kctl;
        unsigned int access;