FreeBSD/sys/dev/cs/if_cs.c
/*
 * Allocate an irq resource with the given resource id.
 */
Allocate an irq resource with the given resource id.
Allocate an irq resource with the given resource id .
int
cs_alloc_irq(device_t dev, int rid)
{
	struct cs_softc *sc = device_get_softc(dev);
	struct resource *res;
	res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE);
	if (res == NULL)
		return (ENOENT);
	sc->irq_rid = rid;
	sc->irq_res = res;
	return (0);
}
int cs_alloc_irq ( device_t dev , int rid ) { struct cs_softc * sc = device_get_softc ( dev ) ; struct resource * res ; res = bus_alloc_resource_any ( dev , SYS_RES_IRQ , & rid , RF_ACTIVE ) ; if ( res == NULL ) return ( ENOENT ) ; sc -> irq_rid = rid ; sc -> irq_res = res ; return ( 0 ) ; }
Allocate an irq resource with the given resource id.
Allocate an irq resource with the given resource id .