stop mmc in dev_done, releasing ref to the device

This commit is contained in:
Alexandre Ratchov 2015-11-25 20:46:03 +01:00
parent 8bb88f248f
commit 66ca92689e
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}