summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2006-04-19 03:38:54 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2006-04-19 03:38:54 +0000
commit5aac8e3590adc56556d0eca073d95fafac12accf (patch)
treeec65f0d4abd470eaa275a18638b6e9e10f208eaa
parent173a68173e0fd0a7988c2f9b522830709905d5f1 (diff)
Make sure sc_first_poll is initialized to 0 so sensor_task_thread
doesn't blow up on first call to ami_refresh(). There's probably a better fix, but this stops the crashes while that fix is found. ok dlg@
-rw-r--r--sys/dev/ic/ami.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index 7bc2206d019..278cc0f4100 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.145 2006/04/18 18:31:04 marco Exp $ */
+/* $OpenBSD: ami.c,v 1.146 2006/04/19 03:38:53 krw Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -576,6 +576,7 @@ ami_attach(struct ami_softc *sc)
else
sc->sc_ioctl = ami_ioctl;
+ sc->sc_first_poll = 0;
if (sensor_task_register(sc, ami_refresh, 10))
printf("%s: unable to register update task\n", DEVNAME(sc));
#endif /* NBIO > 0 */