Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/eisa/eisaconf.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
eisa_write_ivar(device_t dev, device_t child, int which, uintptr_t value) | eisa_write_ivar(device_t dev, device_t child, int which, uintptr_t value) | ||||
{ | { | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
static struct resource * | static struct resource * | ||||
eisa_alloc_resource(device_t dev, device_t child, int type, int *rid, | eisa_alloc_resource(device_t dev, device_t child, int type, int *rid, | ||||
u_long start, u_long end, u_long count, u_int flags) | rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) | ||||
{ | { | ||||
int isdefault; | int isdefault; | ||||
struct eisa_device *e_dev = device_get_ivars(child); | struct eisa_device *e_dev = device_get_ivars(child); | ||||
struct resource *rv, **rvp = 0; | struct resource *rv, **rvp = 0; | ||||
isdefault = (device_get_parent(child) == dev && | isdefault = (device_get_parent(child) == dev && | ||||
start == 0UL && end == ~0UL && count == 1); | start == 0 && end == ~0 && count == 1); | ||||
switch (type) { | switch (type) { | ||||
case SYS_RES_IRQ: | case SYS_RES_IRQ: | ||||
if (isdefault) { | if (isdefault) { | ||||
struct irq_node * irq = eisa_find_irq(e_dev, *rid); | struct irq_node * irq = eisa_find_irq(e_dev, *rid); | ||||
if (irq == NULL) | if (irq == NULL) | ||||
return (NULL); | return (NULL); | ||||
start = end = irq->irq_no; | start = end = irq->irq_no; | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |