diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-07-29 09:44:00 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-08-02 09:06:04 +0200 |
commit | 44e6fc64dfebf48811219a9c24666b4b87dc0ec5 (patch) | |
tree | a3c6b4286e337a99d43b3c3ce7717b155d16d8aa /sound/usb/card.c | |
parent | 8bfe17ad975ffbd0c7ce673993ed2242fbc4ad94 (diff) | |
download | linux-44e6fc64dfebf48811219a9c24666b4b87dc0ec5.tar.gz |
ALSA: usb-audio: Move autosuspend quirk into quirk_flags
The auto-suspend suppression workaround for Lenovo machines are
handled in quirks-table.h. Now it's more easier to handle with
quirk_flags.
Link: https://lore.kernel.org/r/20210729074404.19728-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.c')
-rw-r--r-- | sound/usb/card.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index 8c32a784f1e4..d66a3788111c 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -804,6 +804,9 @@ static int usb_audio_probe(struct usb_interface *intf, dev_set_drvdata(&dev->dev, chip); + if (chip->quirk_flags & QUIRK_FLAG_DISABLE_AUTOSUSPEND) + usb_disable_autosuspend(interface_to_usbdev(intf)); + /* * For devices with more than one control interface, we assume the * first contains the audio controls. We might need a more specific @@ -929,7 +932,7 @@ static void usb_audio_disconnect(struct usb_interface *intf) } } - if (chip->quirk_type == QUIRK_SETUP_DISABLE_AUTOSUSPEND) + if (chip->quirk_flags & QUIRK_FLAG_DISABLE_AUTOSUSPEND) usb_enable_autosuspend(interface_to_usbdev(intf)); chip->num_interfaces--; |