Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpica/acpi_hpet.c
Show First 20 Lines • Show All 316 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Find an existing IRQ resource that matches the requested IRQ range | * Find an existing IRQ resource that matches the requested IRQ range | ||||
* and return its RID. If one is not found, use a new RID. | * and return its RID. If one is not found, use a new RID. | ||||
*/ | */ | ||||
static int | static int | ||||
hpet_find_irq_rid(device_t dev, u_long start, u_long end) | hpet_find_irq_rid(device_t dev, u_long start, u_long end) | ||||
{ | { | ||||
u_long irq; | rman_res_t irq; | ||||
int error, rid; | int error, rid; | ||||
for (rid = 0;; rid++) { | for (rid = 0;; rid++) { | ||||
error = bus_get_resource(dev, SYS_RES_IRQ, rid, &irq, NULL); | error = bus_get_resource(dev, SYS_RES_IRQ, rid, &irq, NULL); | ||||
if (error != 0 || (start <= irq && irq <= end)) | if (error != 0 || (start <= irq && irq <= end)) | ||||
return (rid); | return (rid); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 601 Lines • Show Last 20 Lines |