[alsa-devel] [PATCH 7/8] ALSA: control: rename to appropriate macro name

Takashi Sakamoto o-takashi at sakamocchi.jp
Wed Feb 11 11:37:31 CET 2015


MAX_CONTROL_COUNT is used for the maximum number of values included in
a control, therefore should be rename to mean it.

Signed-off-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>
---
 sound/core/control.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/core/control.c b/sound/core/control.c
index c18ac04..04534f3 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -30,9 +30,11 @@
 #include <sound/info.h>
 #include <sound/control.h>
 
+/* The maximum number of values which one control has. */
+#define MAX_VALUES_COUNT	1028
+
 /* max number of user-defined controls */
 #define MAX_USER_CONTROLS	32
-#define MAX_CONTROL_COUNT	1028
 
 struct snd_kctl_ioctl {
 	struct list_head list;		/* list of all ioctls */
@@ -211,7 +213,7 @@ static struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control,
 	if (snd_BUG_ON(!control || !control->count))
 		return NULL;
 
-	if (control->count > MAX_CONTROL_COUNT)
+	if (control->count > MAX_VALUES_COUNT)
 		return NULL;
 
 	size  = sizeof(*kctl);
-- 
2.1.0



More information about the Alsa-devel mailing list