Lines Matching refs:unit
76 int unit;
598 SND_CLONE_ASSERT(ce->unit == dev2unit(dev),
599 ("invalid unit ce->unit=0x%08x dev2unit=0x%08x",
600 ce->unit, dev2unit(dev)));
611 snd_clone_alloc(struct snd_clone *c, struct cdev **dev, int *unit, int tmask)
623 SND_CLONE_ASSERT(unit != NULL, ("NULL unit pointer"));
624 SND_CLONE_ASSERT(*unit == -1 || !(*unit & (c->typemask | tmask)),
625 ("typemask collision: typemask=0x%08x tmask=0x%08x *unit=%d",
626 c->typemask, tmask, *unit));
629 (*unit != -1 && *unit > c->maxunit))
639 allocunit = (*unit == -1) ? 0 : *unit;
648 if (tmask > (ce->unit & c->typemask)) {
652 } else if (tmask < (ce->unit & c->typemask))
659 if (*unit != -1 && *unit == (ce->unit & ~tmask))
665 * to allocation unit. While here, look for free slot
668 if (*unit == -1 && (ce->unit & ~tmask) == allocunit)
670 if ((ce->unit & ~tmask) < allocunit)
698 if (*unit != -1)
709 if (allocunit < (nce->unit & ~tmask))
715 * Maximum allowable unit reached. Try returning any
746 if (*unit != -1)
766 ce->unit = tmask | allocunit;
778 * Save new allocation unit for caller which will be used
781 *unit = allocunit;