Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Use native functions instead of polluting the namespace ...
details: https://anonhg.NetBSD.org/src/rev/4b99b4aeba07
branches: trunk
changeset: 752515:4b99b4aeba07
user: jruoho <jruoho%NetBSD.org@localhost>
date: Sun Feb 28 13:56:49 2010 +0000
description:
Use native functions instead of polluting the namespace with ACPICA-macros.
diffstat:
sys/arch/x86/acpi/acpi_wakeup.c | 10 ++++++----
sys/dev/acpi/wmi_acpi.c | 12 ++++++------
2 files changed, 12 insertions(+), 10 deletions(-)
diffs (85 lines):
diff -r c4328aa2f14d -r 4b99b4aeba07 sys/arch/x86/acpi/acpi_wakeup.c
--- a/sys/arch/x86/acpi/acpi_wakeup.c Sun Feb 28 13:10:43 2010 +0000
+++ b/sys/arch/x86/acpi/acpi_wakeup.c Sun Feb 28 13:56:49 2010 +0000
@@ -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 <takawata%jp.freebsd.org@localhost>
@@ -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;
diff -r c4328aa2f14d -r 4b99b4aeba07 sys/dev/acpi/wmi_acpi.c
--- a/sys/dev/acpi/wmi_acpi.c Sun Feb 28 13:10:43 2010 +0000
+++ b/sys/dev/acpi/wmi_acpi.c Sun Feb 28 13:56:49 2010 +0000
@@ -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 <jruohonen%iki.fi@localhost>
@@ -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++;
Home |
Main Index |
Thread Index |
Old Index