From a3bee37496571c4f1f92cf81531ec9cb069da3db Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Wed, 14 May 2008 07:52:53 +0000 Subject: Clean up a bit. ok jordan@ --- sys/dev/acpi/acpiprt.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/acpi/acpiprt.c b/sys/dev/acpi/acpiprt.c index a6a980f6798..b698990e841 100644 --- a/sys/dev/acpi/acpiprt.c +++ b/sys/dev/acpi/acpiprt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpiprt.c,v 1.21 2008/05/14 05:24:36 jordan Exp $ */ +/* $OpenBSD: acpiprt.c,v 1.22 2008/05/14 07:52:52 brad Exp $ */ /* * Copyright (c) 2006 Mark Kettenis * @@ -45,7 +45,7 @@ int acpiprt_match(struct device *, void *, void *); void acpiprt_attach(struct device *, struct device *, void *); int acpiprt_getirq(union acpi_resource *crs, void *arg); int acpiprt_getminbus(union acpi_resource *, void *); -int acpiprt_showprs(union acpi_resource *, void *); +int acpiprt_showprs(union acpi_resource *, void *); struct acpiprt_softc { @@ -129,19 +129,17 @@ acpiprt_showprs(union acpi_resource *crs, void *arg) switch (typ) { case SR_IRQ: printf("possible irq:[ "); - for (typ=0; typsr_irq.irq_mask)*8; typ++) { - if (crs->sr_irq.irq_mask & (1L << typ)) { + for (typ = 0; typ < sizeof(crs->sr_irq.irq_mask) * 8; typ++) { + if (crs->sr_irq.irq_mask & (1L << typ)) printf("%d%s ", typ, (typ == *irq) ? "*" : ""); - } } printf("]\n"); break; case LR_EXTIRQ: printf("possible irq: [ "); - for (typ=0; typlr_extirq.irq_count; typ++) { + for (typ = 0; typ < crs->lr_extirq.irq_count; typ++) printf("%d%s ", crs->lr_extirq.irq[typ], crs->lr_extirq.irq[typ] == *irq ? "*" : ""); - } printf("]\n"); break; default: -- cgit v1.2.3