Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/isa Put the original NULL pmf handler establishment ...
details: https://anonhg.NetBSD.org/src/rev/8858d6a905a0
branches: trunk
changeset: 756432:8858d6a905a0
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sat Jul 17 21:51:43 2010 +0000
description:
Put the original NULL pmf handler establishment back where it started, so
as not to call it in some error paths.
Instead, if there is a watchdog present, deregister the NULL handler before
establishing the one for the watchdog.
diffstat:
sys/dev/isa/itesio_isa.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (47 lines):
diff -r 3787f4ecb077 -r 8858d6a905a0 sys/dev/isa/itesio_isa.c
--- a/sys/dev/isa/itesio_isa.c Sat Jul 17 21:36:26 2010 +0000
+++ b/sys/dev/isa/itesio_isa.c Sat Jul 17 21:51:43 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: itesio_isa.c,v 1.19 2010/07/17 21:36:26 pgoyette Exp $ */
+/* $NetBSD: itesio_isa.c,v 1.20 2010/07/17 21:51:43 pgoyette Exp $ */
/* Derived from $OpenBSD: it.c,v 1.19 2006/04/10 00:57:54 deraadt Exp $ */
/*
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: itesio_isa.c,v 1.19 2010/07/17 21:36:26 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: itesio_isa.c,v 1.20 2010/07/17 21:51:43 pgoyette Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -251,6 +251,9 @@
}
sc->sc_hwmon_enabled = true;
+ if (!pmf_device_register(self, NULL, NULL))
+ aprint_error_dev(self, "couldn't establish power handler\n");
+
/* The IT8705 doesn't support the WDT */
if (sc->sc_chipid == ITESIO_ID8705)
goto out2;
@@ -271,6 +274,7 @@
sc->sc_wdt_enabled = true;
aprint_normal_dev(self, "Watchdog Timer present\n");
+ pmf_device_deregister(self);
if (!pmf_device_register(self, itesio_wdt_suspend, NULL))
aprint_error_dev(self, "couldn't establish power handler\n");
@@ -280,10 +284,6 @@
bus_space_unmap(sc->sc_iot, sc->sc_ec_ioh, 8);
out2:
bus_space_unmap(sc->sc_iot, sc->sc_pnp_ioh, 2);
-
- if (!pmf_device_register(self, NULL, NULL))
- aprint_error_dev(self, "couldn't establish power handler\n");
-
}
static int
Home |
Main Index |
Thread Index |
Old Index