mirror of https://github.com/ericonr/sndio.git
sndiod: Set slot state outside slot_attach() as we do in slot_detach().
This commit is contained in:
parent
6bc6041b30
commit
c9a6bf3db6
|
@ -1328,6 +1328,7 @@ dev_sync_attach(struct dev *d)
|
|||
if (!s->ops || !s->opt->mmc)
|
||||
continue;
|
||||
slot_attach(s);
|
||||
s->pstate = SLOT_RUN;
|
||||
}
|
||||
d->tstate = MMC_RUN;
|
||||
dev_midi_full(d);
|
||||
|
@ -1748,7 +1749,6 @@ slot_attach(struct slot *s)
|
|||
s->delta = startpos + pos / (int)d->round;
|
||||
s->delta_rem = pos % d->round;
|
||||
|
||||
s->pstate = SLOT_RUN;
|
||||
#ifdef DEBUG
|
||||
if (log_level >= 2) {
|
||||
slot_log(s);
|
||||
|
@ -1793,9 +1793,10 @@ slot_ready(struct slot *s)
|
|||
*/
|
||||
if (s->dev->pstate == DEV_CFG)
|
||||
return;
|
||||
if (!s->opt->mmc)
|
||||
if (!s->opt->mmc) {
|
||||
slot_attach(s);
|
||||
else
|
||||
s->pstate = SLOT_RUN;
|
||||
} else
|
||||
dev_sync_attach(s->dev);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue