]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Takashi Iwai <tiwai@suse.de> |
2 | Subject: ALSA: hda - Limit the number of GPIOs show in proc | |
3 | Patch-mainline: 2.6.28-rc4 | |
4 | References: | |
5 | ||
6 | Limit the number of GPIOs shown in proc. Otherwise it gets too long | |
7 | unnecessarily, and hard to analyze. | |
8 | ||
9 | Signed-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, |