diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-06-04 05:41:48 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-06-04 05:42:27 -0400 |
commit | cdbc653a04ee692a7105a96e8dd6055d9971d45c (patch) | |
tree | c1282680b3115edfd693a27bc6758208534ac557 /sound/core/device.c | |
parent | 009f8c90f571d87855914dbc20e6c0ea2a3b19ae (diff) | |
parent | ceec4684085a9e4dc60439d84ab47ce260444804 (diff) |
Merge branch 'for-next' into for-linus
4.18-rc1 merge material.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/device.c')
-rw-r--r-- | sound/core/device.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/core/device.c b/sound/core/device.c index cb0e46f66cc9..535102d564e3 100644 --- a/sound/core/device.c +++ b/sound/core/device.c | |||
@@ -240,6 +240,15 @@ void snd_device_free_all(struct snd_card *card) | |||
240 | 240 | ||
241 | if (snd_BUG_ON(!card)) | 241 | if (snd_BUG_ON(!card)) |
242 | return; | 242 | return; |
243 | list_for_each_entry_safe_reverse(dev, next, &card->devices, list) { | ||
244 | /* exception: free ctl and lowlevel stuff later */ | ||
245 | if (dev->type == SNDRV_DEV_CONTROL || | ||
246 | dev->type == SNDRV_DEV_LOWLEVEL) | ||
247 | continue; | ||
248 | __snd_device_free(dev); | ||
249 | } | ||
250 | |||
251 | /* free all */ | ||
243 | list_for_each_entry_safe_reverse(dev, next, &card->devices, list) | 252 | list_for_each_entry_safe_reverse(dev, next, &card->devices, list) |
244 | __snd_device_free(dev); | 253 | __snd_device_free(dev); |
245 | } | 254 | } |