From 0b51ba07e2e2866bfea40c5551a926dbefae64da Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Mon, 20 Nov 2006 17:50:17 +0100 Subject: [ALSA] make sound/core/control.c:snd_ctl_new() static Now that everyone uses snd_ctl_new1() and noone is using snd_ctl_new() anymore, we can make it static. Signed-off-by: Adrian Bunk Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | 10 ---------- include/sound/control.h | 1 - sound/core/control.c | 5 ++--- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index ccd0a953953..a319905c2c7 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl @@ -3690,16 +3690,6 @@ struct _snd_pcm_runtime { - - Here, the chip instance is retrieved via - snd_kcontrol_chip() macro. This macro - just accesses to kcontrol->private_data. The - kcontrol->private_data field is - given as the argument of snd_ctl_new() - (see the later subsection - Constructor). - - The value field is depending on the type of control as well as on info callback. For example, diff --git a/include/sound/control.h b/include/sound/control.h index 1de148b0fd9..f1361d6694f 100644 --- a/include/sound/control.h +++ b/include/sound/control.h @@ -108,7 +108,6 @@ typedef int (*snd_kctl_ioctl_func_t) (struct snd_card * card, void snd_ctl_notify(struct snd_card * card, unsigned int mask, struct snd_ctl_elem_id * id); -struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol * kcontrol, unsigned int access); struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new * kcontrolnew, void * private_data); void snd_ctl_free_one(struct snd_kcontrol * kcontrol); int snd_ctl_add(struct snd_card * card, struct snd_kcontrol * kcontrol); diff --git a/sound/core/control.c b/sound/core/control.c index 67f09b8f85e..42bcf2794b2 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -183,7 +183,8 @@ EXPORT_SYMBOL(snd_ctl_notify); * * Returns the pointer of the new instance, or NULL on failure. */ -struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control, unsigned int access) +static struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control, + unsigned int access) { struct snd_kcontrol *kctl; unsigned int idx; @@ -201,8 +202,6 @@ struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control, unsigned int acce return kctl; } -EXPORT_SYMBOL(snd_ctl_new); - /** * snd_ctl_new1 - create a control instance from the template * @ncontrol: the initialization record -- cgit v1.2.3