diff options
-rw-r--r-- | sound/core/jack.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/core/jack.c b/sound/core/jack.c index f705eec7372a..f6f091f2b382 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <sound/jack.h> | 23 | #include <sound/jack.h> |
24 | #include <sound/core.h> | 24 | #include <sound/core.h> |
25 | 25 | ||
26 | static int jack_types[] = { | 26 | static int jack_switch_types[] = { |
27 | SW_HEADPHONE_INSERT, | 27 | SW_HEADPHONE_INSERT, |
28 | SW_MICROPHONE_INSERT, | 28 | SW_MICROPHONE_INSERT, |
29 | SW_LINEOUT_INSERT, | 29 | SW_LINEOUT_INSERT, |
@@ -112,10 +112,10 @@ int snd_jack_new(struct snd_card *card, const char *id, int type, | |||
112 | 112 | ||
113 | jack->type = type; | 113 | jack->type = type; |
114 | 114 | ||
115 | for (i = 0; i < ARRAY_SIZE(jack_types); i++) | 115 | for (i = 0; i < ARRAY_SIZE(jack_switch_types); i++) |
116 | if (type & (1 << i)) | 116 | if (type & (1 << i)) |
117 | input_set_capability(jack->input_dev, EV_SW, | 117 | input_set_capability(jack->input_dev, EV_SW, |
118 | jack_types[i]); | 118 | jack_switch_types[i]); |
119 | 119 | ||
120 | err = snd_device_new(card, SNDRV_DEV_JACK, jack, &ops); | 120 | err = snd_device_new(card, SNDRV_DEV_JACK, jack, &ops); |
121 | if (err < 0) | 121 | if (err < 0) |
@@ -163,10 +163,11 @@ void snd_jack_report(struct snd_jack *jack, int status) | |||
163 | if (!jack) | 163 | if (!jack) |
164 | return; | 164 | return; |
165 | 165 | ||
166 | for (i = 0; i < ARRAY_SIZE(jack_types); i++) { | 166 | for (i = 0; i < ARRAY_SIZE(jack_switch_types); i++) { |
167 | int testbit = 1 << i; | 167 | int testbit = 1 << i; |
168 | if (jack->type & testbit) | 168 | if (jack->type & testbit) |
169 | input_report_switch(jack->input_dev, jack_types[i], | 169 | input_report_switch(jack->input_dev, |
170 | jack_switch_types[i], | ||
170 | status & testbit); | 171 | status & testbit); |
171 | } | 172 | } |
172 | 173 | ||