Skip to content

Commit 0b51ba0

Browse files
AdrianBunkJaroslav Kysela
authored andcommitted
[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 <bunk@stusta.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
1 parent 5cd5752 commit 0b51ba0

3 files changed

Lines changed: 2 additions & 14 deletions

File tree

‎Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3690,16 +3690,6 @@ struct _snd_pcm_runtime {
36903690
</example>
36913691
</para>
36923692

3693-
<para>
3694-
Here, the chip instance is retrieved via
3695-
<function>snd_kcontrol_chip()</function> macro. This macro
3696-
just accesses to kcontrol-&gt;private_data. The
3697-
kcontrol-&gt;private_data field is
3698-
given as the argument of <function>snd_ctl_new()</function>
3699-
(see the later subsection
3700-
<link linkend="control-interface-constructor"><citetitle>Constructor</citetitle></link>).
3701-
</para>
3702-
37033693
<para>
37043694
The <structfield>value</structfield> field is depending on
37053695
the type of control as well as on info callback. For example,

‎include/sound/control.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ typedef int (*snd_kctl_ioctl_func_t) (struct snd_card * card,
108108

109109
void snd_ctl_notify(struct snd_card * card, unsigned int mask, struct snd_ctl_elem_id * id);
110110

111-
struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol * kcontrol, unsigned int access);
112111
struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new * kcontrolnew, void * private_data);
113112
void snd_ctl_free_one(struct snd_kcontrol * kcontrol);
114113
int snd_ctl_add(struct snd_card * card, struct snd_kcontrol * kcontrol);

‎sound/core/control.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ EXPORT_SYMBOL(snd_ctl_notify);
183183
*
184184
* Returns the pointer of the new instance, or NULL on failure.
185185
*/
186-
struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control, unsigned int access)
186+
static struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control,
187+
unsigned int access)
187188
{
188189
struct snd_kcontrol *kctl;
189190
unsigned int idx;
@@ -201,8 +202,6 @@ struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control, unsigned int acce
201202
return kctl;
202203
}
203204

204-
EXPORT_SYMBOL(snd_ctl_new);
205-
206205
/**
207206
* snd_ctl_new1 - create a control instance from the template
208207
* @ncontrol: the initialization record

0 commit comments

Comments
 (0)