summaryrefslogtreecommitdiff
path: root/sound/usb/card.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-07-29 10:44:00 +0300
committerTakashi Iwai <tiwai@suse.de>2021-08-02 10:06:04 +0300
commit44e6fc64dfebf48811219a9c24666b4b87dc0ec5 (patch)
treea3c6b4286e337a99d43b3c3ce7717b155d16d8aa /sound/usb/card.c
parent8bfe17ad975ffbd0c7ce673993ed2242fbc4ad94 (diff)
downloadlinux-44e6fc64dfebf48811219a9c24666b4b87dc0ec5.tar.xz
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.c5
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--;