diff options
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 | } |