* [RFC: 2.6 patch] make sound/core/control.c:snd_ctl_new() static
@ 2006-11-17 17:02 Adrian Bunk
2006-11-20 16:51 ` [Alsa-devel] " Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2006-11-17 17:02 UTC (permalink / raw)
To: perex; +Cc: alsa-devel, linux-kernel
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>
---
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(-)
--- linux-2.6.19-rc5-mm2/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl.old 2006-11-17 16:48:12.000000000 +0100
+++ linux-2.6.19-rc5-mm2/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl 2006-11-17 16:48:22.000000000 +0100
@@ -3691,16 +3691,6 @@
</para>
<para>
- Here, the chip instance is retrieved via
- <function>snd_kcontrol_chip()</function> macro. This macro
- just accesses to kcontrol->private_data. The
- kcontrol->private_data field is
- given as the argument of <function>snd_ctl_new()</function>
- (see the later subsection
- <link linkend="control-interface-constructor"><citetitle>Constructor</citetitle></link>).
- </para>
-
- <para>
The <structfield>value</structfield> field is depending on
the type of control as well as on info callback. For example,
the sb driver uses this field to store the register offset,
--- linux-2.6.19-rc5-mm2/include/sound/control.h.old 2006-11-17 16:48:35.000000000 +0100
+++ linux-2.6.19-rc5-mm2/include/sound/control.h 2006-11-17 16:48:39.000000000 +0100
@@ -108,7 +108,6 @@
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);
--- linux-2.6.19-rc5-mm2/sound/core/control.c.old 2006-11-17 16:48:46.000000000 +0100
+++ linux-2.6.19-rc5-mm2/sound/core/control.c 2006-11-17 16:49:39.000000000 +0100
@@ -183,7 +183,8 @@
*
* 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 @@
return kctl;
}
-EXPORT_SYMBOL(snd_ctl_new);
-
/**
* snd_ctl_new1 - create a control instance from the template
* @ncontrol: the initialization record
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Alsa-devel] [RFC: 2.6 patch] make sound/core/control.c:snd_ctl_new() static
2006-11-17 17:02 [RFC: 2.6 patch] make sound/core/control.c:snd_ctl_new() static Adrian Bunk
@ 2006-11-20 16:51 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2006-11-20 16:51 UTC (permalink / raw)
To: Adrian Bunk; +Cc: perex, alsa-devel, linux-kernel
At Fri, 17 Nov 2006 18:02:26 +0100,
Adrian Bunk wrote:
>
> 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>
This makes sense. I merged it to ALSA tree.
Thanks.
Takashi
>
> ---
>
> 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(-)
>
> --- linux-2.6.19-rc5-mm2/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl.old 2006-11-17 16:48:12.000000000 +0100
> +++ linux-2.6.19-rc5-mm2/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl 2006-11-17 16:48:22.000000000 +0100
> @@ -3691,16 +3691,6 @@
> </para>
>
> <para>
> - Here, the chip instance is retrieved via
> - <function>snd_kcontrol_chip()</function> macro. This macro
> - just accesses to kcontrol->private_data. The
> - kcontrol->private_data field is
> - given as the argument of <function>snd_ctl_new()</function>
> - (see the later subsection
> - <link linkend="control-interface-constructor"><citetitle>Constructor</citetitle></link>).
> - </para>
> -
> - <para>
> The <structfield>value</structfield> field is depending on
> the type of control as well as on info callback. For example,
> the sb driver uses this field to store the register offset,
> --- linux-2.6.19-rc5-mm2/include/sound/control.h.old 2006-11-17 16:48:35.000000000 +0100
> +++ linux-2.6.19-rc5-mm2/include/sound/control.h 2006-11-17 16:48:39.000000000 +0100
> @@ -108,7 +108,6 @@
>
> 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);
> --- linux-2.6.19-rc5-mm2/sound/core/control.c.old 2006-11-17 16:48:46.000000000 +0100
> +++ linux-2.6.19-rc5-mm2/sound/core/control.c 2006-11-17 16:49:39.000000000 +0100
> @@ -183,7 +183,8 @@
> *
> * 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 @@
> return kctl;
> }
>
> -EXPORT_SYMBOL(snd_ctl_new);
> -
> /**
> * snd_ctl_new1 - create a control instance from the template
> * @ncontrol: the initialization record
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-20 16:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-17 17:02 [RFC: 2.6 patch] make sound/core/control.c:snd_ctl_new() static Adrian Bunk
2006-11-20 16:51 ` [Alsa-devel] " Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox