Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Also remove the ACPI notify handler upon detach.
details: https://anonhg.NetBSD.org/src/rev/759fe37933ad
branches: trunk
changeset: 751320:759fe37933ad
user: jruoho <jruoho%NetBSD.org@localhost>
date: Sun Jan 31 18:51:33 2010 +0000
description:
Also remove the ACPI notify handler upon detach.
diffstat:
sys/dev/acpi/asus_acpi.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 78114fc7f80f -r 759fe37933ad sys/dev/acpi/asus_acpi.c
--- a/sys/dev/acpi/asus_acpi.c Sun Jan 31 18:12:51 2010 +0000
+++ b/sys/dev/acpi/asus_acpi.c Sun Jan 31 18:51:33 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asus_acpi.c,v 1.15 2010/01/29 12:22:00 jruoho Exp $ */
+/* $NetBSD: asus_acpi.c,v 1.16 2010/01/31 18:51:33 jruoho Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: asus_acpi.c,v 1.15 2010/01/29 12:22:00 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: asus_acpi.c,v 1.16 2010/01/31 18:51:33 jruoho Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -186,8 +186,15 @@
asus_detach(device_t self, int flags)
{
struct asus_softc *sc = device_private(self);
+ ACPI_STATUS rv;
int i;
+ rv = AcpiRemoveNotifyHandler(sc->sc_node->ad_handle,
+ ACPI_ALL_NOTIFY, asus_notify_handler);
+
+ if (ACPI_FAILURE(rv))
+ return EBUSY;
+
if (sc->sc_smpsw_valid)
for (i = 0; i < ASUS_PSW_LAST; i++)
sysmon_pswitch_unregister(&sc->sc_smpsw[i]);
Home |
Main Index |
Thread Index |
Old Index