]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ALSA: hda - Fix wrong gpio_dir & gpio_mask hint setups for IDT/STAC codecs
authorTakashi Iwai <tiwai@suse.de>
Mon, 5 Jan 2015 12:27:33 +0000 (13:27 +0100)
committerZefan Li <lizefan@huawei.com>
Tue, 14 Apr 2015 09:33:49 +0000 (17:33 +0800)
commit c507de88f6a336bd7296c9ec0073b2d4af8b4f5e upstream.

stac_store_hints() does utterly wrong for masking the values for
gpio_dir and gpio_data, likely due to copy&paste errors.  Fortunately,
this feature is used very rarely, so the impact must be really small.

Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Zefan Li <lizefan@huawei.com>
sound/pci/hda/patch_sigmatel.c

index 137b67f8e69a1486a8524f8eeef8b919a3195fac..606f87aa24d9e6900026a9eb4441801aae626986 100644 (file)
@@ -4246,9 +4246,9 @@ static void stac_store_hints(struct hda_codec *codec)
                        spec->gpio_mask;
        }
        if (get_int_hint(codec, "gpio_dir", &spec->gpio_dir))
-               spec->gpio_mask &= spec->gpio_mask;
-       if (get_int_hint(codec, "gpio_data", &spec->gpio_data))
                spec->gpio_dir &= spec->gpio_mask;
+       if (get_int_hint(codec, "gpio_data", &spec->gpio_data))
+               spec->gpio_data &= spec->gpio_mask;
        if (get_int_hint(codec, "eapd_mask", &spec->eapd_mask))
                spec->eapd_mask &= spec->gpio_mask;
        if (get_int_hint(codec, "gpio_mute", &spec->gpio_mute))