summaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-07 19:48:47 +0000
committerTakashi Iwai <tiwai@suse.de>2012-02-27 17:34:44 +0100
commit53803aead010a314f76a8a6fa132fdcc5edf55ed (patch)
tree50f1cb6702a27d150e034828ccd1e696b2da79ab /sound/core
parent62aa2b537c6f5957afd98e29f96897419ed5ebab (diff)
ALSA: Use a define for the number of jack switch types
This is intended to facilitate the merge of the two jack detection mechanisms. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/jack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/jack.c b/sound/core/jack.c
index 26edf63b265f..471e1e3b0a99 100644
--- a/sound/core/jack.c
+++ b/sound/core/jack.c
@@ -25,7 +25,7 @@
#include <sound/jack.h>
#include <sound/core.h>
-static int jack_switch_types[] = {
+static int jack_switch_types[SND_JACK_SWITCH_TYPES] = {
SW_HEADPHONE_INSERT,
SW_MICROPHONE_INSERT,
SW_LINEOUT_INSERT,
@@ -128,7 +128,7 @@ int snd_jack_new(struct snd_card *card, const char *id, int type,
jack->type = type;
- for (i = 0; i < ARRAY_SIZE(jack_switch_types); i++)
+ for (i = 0; i < SND_JACK_SWITCH_TYPES; i++)
if (type & (1 << i))
input_set_capability(jack->input_dev, EV_SW,
jack_switch_types[i]);