get a reference to the device in pure mtc mode, ok armani@

This commit is contained in:
Alexandre Ratchov 2012-11-10 22:58:29 +01:00
parent 6fa4f57d50
commit 1ff4add221
1 changed files with 3 additions and 0 deletions

View File

@ -1363,6 +1363,8 @@ dev_sync_attach(struct dev *d)
return;
}
}
if (!dev_ref(d))
return;
for (i = 0; i < DEV_NSLOT; i++) {
s = d->slot + i;
if (!s->ops)
@ -1417,6 +1419,7 @@ dev_mmcstop(struct dev *d)
return;
case MMC_RUN:
d->tstate = MMC_STOP;
dev_unref(d);
break;
default:
#ifdef DEBUG