]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.drivers/alsa-hda-proc-gpio-fix
Imported linux-2.6.27.39 suse/xen patches.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / alsa-hda-proc-gpio-fix
CommitLineData
2cb7cef9
BS
1From: Takashi Iwai <tiwai@suse.de>
2Subject: ALSA: hda - Limit the number of GPIOs show in proc
3Patch-mainline: 2.6.28-rc4
4References:
5
6Limit the number of GPIOs shown in proc. Otherwise it gets too long
7unnecessarily, and hard to analyze.
8
9Signed-off-by: Takashi Iwai <tiwai@suse.de>
10
11---
12 sound/pci/hda/hda_proc.c | 2 ++
13 1 file changed, 2 insertions(+)
14
15--- a/sound/pci/hda/hda_proc.c
16+++ b/sound/pci/hda/hda_proc.c
17@@ -485,6 +485,8 @@ static void print_gpio(struct snd_info_b
18 (gpio & AC_GPIO_UNSOLICITED) ? 1 : 0,
19 (gpio & AC_GPIO_WAKE) ? 1 : 0);
20 max = gpio & AC_GPIO_IO_COUNT;
21+ if (!max || max > 8)
22+ return;
23 enable = snd_hda_codec_read(codec, nid, 0,
24 AC_VERB_GET_GPIO_MASK, 0);
25 direction = snd_hda_codec_read(codec, nid, 0,