/* Allocate an SCB and return a pointer to the SCB object. NULL is returned if no SCB is free. The caller must already hold the allocator lock at this point.  */
static struct orc_scb * __orc_alloc_scb(struct orc_host *host)
/* Allocate an SCB and return a pointer to the SCB object. NULL is returned if no SCB is free. The caller must already hold the allocator lock at this point.  */
static struct orc_scb * __orc_alloc_scb(struct orc_host *host)
{
	u8 channel;
	unsigned long idx;
	u8 index;
	u8 i;
	channel = host->index;
	for (i = 0; i < 8; i++) {
		for (index = 0; index < 32; index++) {
			if ((host->allocation_map[channel][i] >> index) & 0x01) {
				host->allocation_map[channel][i] &= ~(1 << index);
				idx = index + 32 * i;
				return host->scb_virt + idx;
			}
		}
	}
	return NULL;
}