Module Name:    src
Committed By:   jruoho
Date:           Sun Feb 28 13:56:50 UTC 2010

Modified Files:
        src/sys/arch/x86/acpi: acpi_wakeup.c
        src/sys/dev/acpi: wmi_acpi.c

Log Message:
Use native functions instead of polluting the namespace with ACPICA-macros.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x86/acpi/acpi_wakeup.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/acpi/wmi_acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/acpi/acpi_wakeup.c
diff -u src/sys/arch/x86/acpi/acpi_wakeup.c:1.20 src/sys/arch/x86/acpi/acpi_wakeup.c:1.21
--- src/sys/arch/x86/acpi/acpi_wakeup.c:1.20	Sat Nov  7 07:27:48 2009
+++ src/sys/arch/x86/acpi/acpi_wakeup.c	Sun Feb 28 13:56:49 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_wakeup.c,v 1.20 2009/11/07 07:27:48 cegger Exp $	*/
+/*	$NetBSD: acpi_wakeup.c,v 1.21 2010/02/28 13:56:49 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.20 2009/11/07 07:27:48 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.21 2010/02/28 13:56:49 jruoho Exp $");
 
 /*-
  * Copyright (c) 2001 Takanori Watanabe <takaw...@jp.freebsd.org>
@@ -195,11 +195,13 @@
 
 	/* run the _PTS and _GTS methods */
 
-	ACPI_MEMSET(&ArgList, 0, sizeof(ArgList));
+	(void)memset(&ArgList, 0, sizeof(ArgList));
+
 	ArgList.Count = 1;
 	ArgList.Pointer = &Arg;
 
-	ACPI_MEMSET(&Arg, 0, sizeof(Arg));
+	(void)memset(&Arg, 0, sizeof(Arg));
+
 	Arg.Type = ACPI_TYPE_INTEGER;
 	Arg.Integer.Value = ACPI_STATE_S4;
 

Index: src/sys/dev/acpi/wmi_acpi.c
diff -u src/sys/dev/acpi/wmi_acpi.c:1.13 src/sys/dev/acpi/wmi_acpi.c:1.14
--- src/sys/dev/acpi/wmi_acpi.c:1.13	Wed Feb 24 22:37:56 2010
+++ src/sys/dev/acpi/wmi_acpi.c	Sun Feb 28 13:56:49 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: wmi_acpi.c,v 1.13 2010/02/24 22:37:56 dyoung Exp $	*/
+/*	$NetBSD: wmi_acpi.c,v 1.14 2010/02/28 13:56:49 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2009, 2010 Jukka Ruohonen <jruoho...@iki.fi>
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.13 2010/02/24 22:37:56 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.14 2010/02/28 13:56:49 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -258,7 +258,7 @@
 		if ((wmi = kmem_zalloc(sizeof(*wmi), KM_NOSLEEP)) == NULL)
 			goto fail;
 
-		ACPI_MEMCPY(&wmi->guid, obj->Buffer.Pointer + offset, siz);
+		(void)memcpy(&wmi->guid, obj->Buffer.Pointer + offset, siz);
 
 		wmi->eevent = false;
 		offset = offset + siz;
@@ -332,7 +332,7 @@
 	const char *ptr;
 	uint8_t i;
 
-	if (sc == NULL || src == NULL || ACPI_STRLEN(src) != 36)
+	if (sc == NULL || src == NULL || strlen(src) != 36)
 		return AE_BAD_PARAMETER;
 
 	for (ptr = src, i = 0; i < 16; i++) {
@@ -340,12 +340,12 @@
 		if (*ptr == '-')
 			ptr++;
 
-		ACPI_MEMCPY(hex, ptr, 2);
+		(void)memcpy(hex, ptr, 2);
 
 		if (!HEXCHAR(hex[0]) || !HEXCHAR(hex[1]))
 			return AE_BAD_HEX_CONSTANT;
 
-		bin[i] = ACPI_STRTOUL(hex, NULL, 16) & 0xFF;
+		bin[i] = strtoul(hex, NULL, 16) & 0xFF;
 
 		ptr++;
 		ptr++;

Reply via email to