diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-06-15 18:17:26 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-06-15 18:17:26 +0000 |
commit | 0bc06951a0d06a0401b4b4079f71d9299e8449b5 (patch) | |
tree | 9a094eb51c08bc54bf2c0936fec3883ae36bd411 /sys | |
parent | 78940d17b49e974a6f9f4ffb335b59a1e68cb378 (diff) |
In power_match(), make sure oa_irq is correctly initialized.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/landisk/dev/power.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/landisk/dev/power.c b/sys/arch/landisk/dev/power.c index 4e1ad37ff1f..889acf50e04 100644 --- a/sys/arch/landisk/dev/power.c +++ b/sys/arch/landisk/dev/power.c @@ -1,4 +1,4 @@ -/* $OpenBSD: power.c,v 1.3 2007/04/26 18:12:13 martin Exp $ */ +/* $OpenBSD: power.c,v 1.4 2007/06/15 18:17:25 miod Exp $ */ /* * Copyright (c) 2007 Martin Reindl. @@ -58,9 +58,12 @@ int power_match(struct device *parent, void *match, void *aux) { struct obio_attach_args *oa = aux; + static struct obio_irq power_match_irq; oa->oa_nio = 0; oa->oa_niomem = 0; + if (oa->oa_nirq == 0) + oa->oa_irq = &power_match_irq; oa->oa_nirq = 1; oa->oa_irq[0].or_irq = LANDISK_INTR_PWRSW; |