From 5aac8e3590adc56556d0eca073d95fafac12accf Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Wed, 19 Apr 2006 03:38:54 +0000 Subject: 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@ --- sys/dev/ic/ami.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ -- cgit v1.2.3