mirror of https://github.com/ericonr/sndio.git
Factor slot->pstate change in slot_attach()
This commit is contained in:
parent
6d02c2e7a2
commit
f29da850c6
|
@ -1427,7 +1427,6 @@ dev_sync_attach(struct dev *d)
|
||||||
if (!s->ops || !s->opt->mmc)
|
if (!s->ops || !s->opt->mmc)
|
||||||
continue;
|
continue;
|
||||||
slot_attach(s);
|
slot_attach(s);
|
||||||
s->pstate = SLOT_RUN;
|
|
||||||
}
|
}
|
||||||
d->tstate = MMC_RUN;
|
d->tstate = MMC_RUN;
|
||||||
dev_midi_full(d);
|
dev_midi_full(d);
|
||||||
|
@ -1872,6 +1871,7 @@ slot_attach(struct slot *s)
|
||||||
s->delta = startpos + pos / (int)d->round;
|
s->delta = startpos + pos / (int)d->round;
|
||||||
s->delta_rem = pos % d->round;
|
s->delta_rem = pos % d->round;
|
||||||
|
|
||||||
|
s->pstate = SLOT_RUN;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (log_level >= 2) {
|
if (log_level >= 2) {
|
||||||
slot_log(s);
|
slot_log(s);
|
||||||
|
@ -1916,10 +1916,9 @@ slot_ready(struct slot *s)
|
||||||
*/
|
*/
|
||||||
if (s->dev->pstate == DEV_CFG)
|
if (s->dev->pstate == DEV_CFG)
|
||||||
return;
|
return;
|
||||||
if (!s->opt->mmc) {
|
if (!s->opt->mmc)
|
||||||
slot_attach(s);
|
slot_attach(s);
|
||||||
s->pstate = SLOT_RUN;
|
else
|
||||||
} else
|
|
||||||
dev_sync_attach(s->dev);
|
dev_sync_attach(s->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue