From 66ca92689ee547aede91571c387f00d10b145ee9 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Wed, 25 Nov 2015 20:46:03 +0100 Subject: [PATCH] stop mmc in dev_done, releasing ref to the device --- sndiod/dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sndiod/dev.c b/sndiod/dev.c index 9dc032f..7720e39 100644 --- a/sndiod/dev.c +++ b/sndiod/dev.c @@ -1214,6 +1214,8 @@ dev_done(struct dev *d) log_puts(": draining\n"); } #endif + if (d->tstate != MMC_STOP) + dev_mmcstop(d); if (d->hold) dev_unref(d); }