Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Add a dummy acpi_wmi_event_deregister() to matc...



details:   https://anonhg.NetBSD.org/src/rev/3ae850ce38f5
branches:  trunk
changeset: 753730:3ae850ce38f5
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Thu Apr 08 10:33:13 2010 +0000

description:
Add a dummy acpi_wmi_event_deregister() to match existing conventions.

diffstat:

 sys/dev/acpi/wmi/wmi_dell.c |   8 ++++----
 sys/dev/acpi/wmi_acpi.c     |  13 ++++++++-----
 sys/dev/acpi/wmi_acpivar.h  |  26 +++++++++++++++-----------
 3 files changed, 27 insertions(+), 20 deletions(-)

diffs (117 lines):

diff -r 818d1d36c578 -r 3ae850ce38f5 sys/dev/acpi/wmi/wmi_dell.c
--- a/sys/dev/acpi/wmi/wmi_dell.c       Thu Apr 08 10:06:25 2010 +0000
+++ b/sys/dev/acpi/wmi/wmi_dell.c       Thu Apr 08 10:33:13 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wmi_dell.c,v 1.1 2010/04/08 09:35:15 jruoho Exp $ */
+/*     $NetBSD: wmi_dell.c,v 1.2 2010/04/08 10:33:13 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wmi_dell.c,v 1.1 2010/04/08 09:35:15 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wmi_dell.c,v 1.2 2010/04/08 10:33:13 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -124,7 +124,7 @@
        int i;
 
        (void)pmf_device_deregister(self);
-       (void)acpi_wmi_event_register(parent, NULL);
+       (void)acpi_wmi_event_deregister(parent);
 
        if (sc->sc_smpsw_valid != true)
                return 0;
@@ -141,7 +141,7 @@
        struct wmi_dell_softc *sc = device_private(self);
        device_t parent = sc->sc_parent;
 
-       (void)acpi_wmi_event_register(parent, NULL);
+       (void)acpi_wmi_event_deregister(parent);
 
        return true;
 }
diff -r 818d1d36c578 -r 3ae850ce38f5 sys/dev/acpi/wmi_acpi.c
--- a/sys/dev/acpi/wmi_acpi.c   Thu Apr 08 10:06:25 2010 +0000
+++ b/sys/dev/acpi/wmi_acpi.c   Thu Apr 08 10:33:13 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wmi_acpi.c,v 1.16 2010/03/08 10:53:03 jruoho Exp $     */
+/*     $NetBSD: wmi_acpi.c,v 1.17 2010/04/08 10:33:13 jruoho Exp $     */
 
 /*-
  * Copyright (c) 2009, 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.16 2010/03/08 10:53:03 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.17 2010/04/08 10:33:13 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -544,9 +544,6 @@
        (*sc->sc_handler)(NULL, evt, sc->sc_child);
 }
 
-/*
- * Adds or removes (NULL) the external event handler.
- */
 ACPI_STATUS
 acpi_wmi_event_register(device_t self, ACPI_NOTIFY_HANDLER handler)
 {
@@ -563,6 +560,12 @@
        return AE_OK;
 }
 
+ACPI_STATUS
+acpi_wmi_event_deregister(device_t self)
+{
+       return acpi_wmi_event_register(self, NULL);
+}
+
 /*
  * As there is no prior knowledge about the expensive
  * events that cause "significant overhead", try to
diff -r 818d1d36c578 -r 3ae850ce38f5 sys/dev/acpi/wmi_acpivar.h
--- a/sys/dev/acpi/wmi_acpivar.h        Thu Apr 08 10:06:25 2010 +0000
+++ b/sys/dev/acpi/wmi_acpivar.h        Thu Apr 08 10:33:13 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wmi_acpivar.h,v 1.7 2010/03/05 08:30:48 jruoho Exp $   */
+/*     $NetBSD: wmi_acpivar.h,v 1.8 2010/04/08 10:33:13 jruoho Exp $   */
 
 /*-
  * Copyright (c) 2009, 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -31,16 +31,20 @@
 #define _SYS_DEV_ACPI_WMI_ACPIVAR_H
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wmi_acpivar.h,v 1.7 2010/03/05 08:30:48 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wmi_acpivar.h,v 1.8 2010/04/08 10:33:13 jruoho Exp $");
+
+ACPI_STATUS    acpi_wmi_event_register(device_t, ACPI_NOTIFY_HANDLER);
+ACPI_STATUS    acpi_wmi_event_deregister(device_t);
+ACPI_STATUS    acpi_wmi_event_get(device_t, uint32_t, ACPI_BUFFER *);
+
+int            acpi_wmi_guid_match(device_t, const char *);
 
-ACPI_STATUS acpi_wmi_event_register(device_t, ACPI_NOTIFY_HANDLER);
-ACPI_STATUS acpi_wmi_event_get(device_t, uint32_t, ACPI_BUFFER *);
-int         acpi_wmi_guid_match(device_t, const char *);
-ACPI_STATUS acpi_wmi_data_query(device_t, const char *,
-                                uint8_t, ACPI_BUFFER *);
-ACPI_STATUS acpi_wmi_data_write(device_t, const char *,
-                                uint8_t, ACPI_BUFFER *);
-ACPI_STATUS acpi_wmi_method(device_t, const char *, uint8_t,
-                            uint32_t, ACPI_BUFFER *, ACPI_BUFFER *);
+ACPI_STATUS    acpi_wmi_data_query(device_t, const char *,
+                               uint8_t, ACPI_BUFFER *);
+ACPI_STATUS    acpi_wmi_data_write(device_t, const char *,
+                               uint8_t, ACPI_BUFFER *);
+
+ACPI_STATUS    acpi_wmi_method(device_t, const char *, uint8_t,
+                               uint32_t, ACPI_BUFFER *, ACPI_BUFFER *);
 
 #endif /* !_SYS_DEV_ACPI_WMI_ACPIVAR_H */



Home | Main Index | Thread Index | Old Index