diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 7b76fd592902..887454d5e9c9 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.69 2005/05/02 14:53:59 kochi Exp $ */ +/* $NetBSD: acpi.c,v 1.70 2005/05/29 20:56:02 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.69 2005/05/02 14:53:59 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.70 2005/05/29 20:56:02 christos Exp $"); #include "opt_acpi.h" @@ -430,7 +430,7 @@ acpi_build_tree(struct acpi_softc *sc) state.scope = as; - rv = AcpiGetHandle(ACPI_ROOT_OBJECT, (char *) scopes[i], + rv = AcpiGetHandle(ACPI_ROOT_OBJECT, scopes[i], &parent); if (ACPI_SUCCESS(rv)) { AcpiWalkNamespace(ACPI_TYPE_ANY, parent, 100, @@ -651,7 +651,7 @@ acpi_print(void *aux, const char *pnp) if (aa->aa_node->ad_devinfo->Valid & ACPI_VALID_HID) { aprint_normal(" (%s", aa->aa_node->ad_devinfo->HardwareId.Value); if (aa->aa_node->ad_devinfo->Valid & ACPI_VALID_UID) { - char *uid; + const char *uid; uid = aa->aa_node->ad_devinfo->UniqueId.Value; if (uid[0] == '\0') @@ -786,7 +786,7 @@ acpi_fixed_button_pressed(void *context) * Evaluate an integer object. */ ACPI_STATUS -acpi_eval_integer(ACPI_HANDLE handle, char *path, ACPI_INTEGER *valp) +acpi_eval_integer(ACPI_HANDLE handle, const char *path, ACPI_INTEGER *valp) { ACPI_STATUS rv; ACPI_BUFFER buf; @@ -811,7 +811,7 @@ acpi_eval_integer(ACPI_HANDLE handle, char *path, ACPI_INTEGER *valp) * Evaluate a (Unicode) string object. */ ACPI_STATUS -acpi_eval_string(ACPI_HANDLE handle, char *path, char **stringp) +acpi_eval_string(ACPI_HANDLE handle, const char *path, char **stringp) { ACPI_STATUS rv; ACPI_BUFFER buf; @@ -845,7 +845,7 @@ acpi_eval_string(ACPI_HANDLE handle, char *path, char **stringp) * Caller must free buf.Pointer by AcpiOsFree(). */ ACPI_STATUS -acpi_eval_struct(ACPI_HANDLE handle, char *path, ACPI_BUFFER *bufp) +acpi_eval_struct(ACPI_HANDLE handle, const char *path, ACPI_BUFFER *bufp) { ACPI_STATUS rv; diff --git a/sys/dev/acpi/acpi_powerres.c b/sys/dev/acpi/acpi_powerres.c index 5025553d0dcb..c148e3586fbf 100644 --- a/sys/dev/acpi/acpi_powerres.c +++ b/sys/dev/acpi/acpi_powerres.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_powerres.c,v 1.1 2004/05/26 17:15:17 kochi Exp $ */ +/* $NetBSD: acpi_powerres.c,v 1.2 2005/05/29 20:56:02 christos Exp $ */ /*- * Copyright (c) 2001 Michael Smith @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_powerres.c,v 1.1 2004/05/26 17:15:17 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_powerres.c,v 1.2 2005/05/29 20:56:02 christos Exp $"); #include #include @@ -298,7 +298,7 @@ acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state) ACPI_BUFFER reslist_buffer; ACPI_OBJECT *reslist_object; ACPI_STATUS status; - char *method_name, *reslist_name; + const char *method_name, *reslist_name; int res_changed; ACPI_FUNCTION_TRACE(__FUNCTION__); diff --git a/sys/dev/acpi/acpi_resource.c b/sys/dev/acpi/acpi_resource.c index 2703583b98c9..aa3e59616d66 100644 --- a/sys/dev/acpi/acpi_resource.c +++ b/sys/dev/acpi/acpi_resource.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_resource.c,v 1.16 2005/02/27 00:26:58 perry Exp $ */ +/* $NetBSD: acpi_resource.c,v 1.17 2005/05/29 20:56:02 christos Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_resource.c,v 1.16 2005/02/27 00:26:58 perry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_resource.c,v 1.17 2005/05/29 20:56:02 christos Exp $"); #include #include @@ -281,7 +281,7 @@ acpi_resource_parse_callback(ACPI_RESOURCE *res, void *context) * items, such as GPE bits. */ ACPI_STATUS -acpi_resource_parse(struct device *dev, ACPI_HANDLE handle, char *path, +acpi_resource_parse(struct device *dev, ACPI_HANDLE handle, const char *path, void *arg, const struct acpi_resource_parse_ops *ops) { struct resource_parse_callback_arg cbarg; @@ -296,7 +296,7 @@ acpi_resource_parse(struct device *dev, ACPI_HANDLE handle, char *path, cbarg.ops = ops; cbarg.dev = dev; - rv =AcpiWalkResources(handle, path, acpi_resource_parse_callback, + rv = AcpiWalkResources(handle, path, acpi_resource_parse_callback, &cbarg); if (ACPI_FAILURE(rv)) { printf("%s: ACPI: unable to get %s resources: %s\n", diff --git a/sys/dev/acpi/acpi_tz.c b/sys/dev/acpi/acpi_tz.c index a60fb4862b9a..b9673b2d8510 100644 --- a/sys/dev/acpi/acpi_tz.c +++ b/sys/dev/acpi/acpi_tz.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_tz.c,v 1.15 2005/05/02 14:54:00 kochi Exp $ */ +/* $NetBSD: acpi_tz.c,v 1.16 2005/05/29 20:56:02 christos Exp $ */ /* * Copyright (c) 2003 Jared D. McNeill @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.15 2005/05/02 14:54:00 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.16 2005/05/29 20:56:02 christos Exp $"); #include #include @@ -131,7 +131,7 @@ static void acpitz_sane_temp(UINT32 *tmp); static ACPI_STATUS acpitz_switch_cooler(ACPI_OBJECT *, void *); static void acpitz_notify_handler(ACPI_HANDLE, UINT32, void *); -static int acpitz_get_integer(struct acpitz_softc *, char *, UINT32 *); +static int acpitz_get_integer(struct acpitz_softc *, const char *, UINT32 *); static void acpitz_tick(void *); static void acpitz_init_envsys(struct acpitz_softc *); static int acpitz_gtredata(struct sysmon_envsys *, @@ -546,7 +546,7 @@ acpitz_sane_temp(UINT32 *tmp) } static int -acpitz_get_integer(struct acpitz_softc *sc, char *cm, UINT32 *val) +acpitz_get_integer(struct acpitz_softc *sc, const char *cm, UINT32 *val) { ACPI_STATUS rv; ACPI_INTEGER tmp; diff --git a/sys/dev/acpi/acpica/Osd/OsdMisc.c b/sys/dev/acpi/acpica/Osd/OsdMisc.c index 4a8a524f3050..0ec85beae893 100644 --- a/sys/dev/acpi/acpica/Osd/OsdMisc.c +++ b/sys/dev/acpi/acpica/Osd/OsdMisc.c @@ -1,4 +1,4 @@ -/* $NetBSD: OsdMisc.c,v 1.10 2004/06/07 17:35:14 kochi Exp $ */ +/* $NetBSD: OsdMisc.c,v 1.11 2005/05/29 20:56:02 christos Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: OsdMisc.c,v 1.10 2004/06/07 17:35:14 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: OsdMisc.c,v 1.11 2005/05/29 20:56:02 christos Exp $"); #include "opt_ddb.h" @@ -92,13 +92,13 @@ int acpi_indebugger; * Break to the debugger or display a breakpoint message. */ ACPI_STATUS -AcpiOsSignal(UINT32 Function, void *Info) +AcpiOsSignal(UINT32 Function, const void *Info) { switch (Function) { case ACPI_SIGNAL_FATAL: { - ACPI_SIGNAL_FATAL_INFO *info = Info; + const ACPI_SIGNAL_FATAL_INFO *info = Info; panic("ACPI fatal signal: " "Type 0x%08x, Code 0x%08x, Argument 0x%08x", diff --git a/sys/dev/acpi/acpica/Subsystem/aclocal.h b/sys/dev/acpi/acpica/Subsystem/aclocal.h index 588edcf0d7c9..042556ff80c8 100644 --- a/sys/dev/acpi/acpica/Subsystem/aclocal.h +++ b/sys/dev/acpi/acpica/Subsystem/aclocal.h @@ -334,9 +334,9 @@ typedef struct acpi_ns_search_data */ typedef struct acpi_predefined_names { - char *Name; + const char *Name; UINT8 Type; - char *Val; + const char *Val; } ACPI_PREDEFINED_NAMES; @@ -351,8 +351,8 @@ typedef struct acpi_predefined_names typedef struct acpi_namestring_info { - char *ExternalName; - char *NextExternalChar; + const char *ExternalName; + const char *NextExternalChar; char *InternalName; UINT32 Length; UINT32 NumSegments; diff --git a/sys/dev/acpi/acpica/Subsystem/acmacros.h b/sys/dev/acpi/acpica/Subsystem/acmacros.h index 6d38582bd897..9ccb54a22853 100644 --- a/sys/dev/acpi/acpica/Subsystem/acmacros.h +++ b/sys/dev/acpi/acpica/Subsystem/acmacros.h @@ -198,6 +198,8 @@ #define ACPI_CAST_PTR(t, p) ((t *)(void *)(p)) #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **)(void *)(p)) +#define ACPI_CAST_CONST_PTR(t, p) ((const t *)(const void *)(p)) +#define ACPI_CAST_CONST_INDIRECT_PTR(t, p) ((const t **)(const void *)(p)) #if ACPI_MACHINE_WIDTH == 16 #define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s) @@ -228,31 +230,31 @@ /* Hi...Lo Lo...Hi */ /* 16-bit source, 16/32/64 destination */ -#define ACPI_MOVE_16_TO_16(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[1];\ - (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[0];} +#define ACPI_MOVE_16_TO_16(d,s) {(( UINT8 *)(void *)(d))[0] = ((const UINT8 *)(const void *)(s))[1];\ + (( UINT8 *)(void *)(d))[1] = ((const UINT8 *)(const void *)(s))[0];} #define ACPI_MOVE_16_TO_32(d,s) {(*(UINT32 *)(void *)(d))=0;\ - ((UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[1];\ - ((UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[0];} + ((UINT8 *)(void *)(d))[2] = ((const UINT8 *)(const void *)(s))[1];\ + ((UINT8 *)(void *)(d))[3] = ((const UINT8 *)(const void *)(s))[0];} #define ACPI_MOVE_16_TO_64(d,s) {(*(UINT64 *)(void *)(d))=0;\ - ((UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\ - ((UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];} + ((UINT8 *)(void *)(d))[6] = ((const UINT8 *)(const void *)(s))[1];\ + ((UINT8 *)(void *)(d))[7] = ((const UINT8 *)(const void *)(s))[0];} /* 32-bit source, 16/32/64 destination */ #define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ -#define ACPI_MOVE_32_TO_32(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\ - (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];\ - (( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[1];\ - (( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[0];} +#define ACPI_MOVE_32_TO_32(d,s) {(( UINT8 *)(void *)(d))[0] = ((const UINT8 *)(const void *)(s))[3];\ + (( UINT8 *)(void *)(d))[1] = ((const UINT8 *)(const void *)(s))[2];\ + (( UINT8 *)(void *)(d))[2] = ((const UINT8 *)(const void *)(s))[1];\ + (( UINT8 *)(void *)(d))[3] = ((const UINT8 *)(const void *)(s))[0];} #define ACPI_MOVE_32_TO_64(d,s) {(*(UINT64 *)(void *)(d))=0;\ - ((UINT8 *)(void *)(d))[4] = ((UINT8 *)(void *)(s))[3];\ - ((UINT8 *)(void *)(d))[5] = ((UINT8 *)(void *)(s))[2];\ - ((UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\ - ((UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];} + ((UINT8 *)(void *)(d))[4] = ((const UINT8 *)(const void *)(s))[3];\ + ((UINT8 *)(void *)(d))[5] = ((const UINT8 *)(const void *)(s))[2];\ + ((UINT8 *)(void *)(d))[6] = ((const UINT8 *)(const void *)(s))[1];\ + ((UINT8 *)(void *)(d))[7] = ((const UINT8 *)(const void *)(s))[0];} /* 64-bit source, 16/32/64 destination */ @@ -260,14 +262,14 @@ #define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ -#define ACPI_MOVE_64_TO_64(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\ - (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\ - (( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[5];\ - (( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[4];\ - (( UINT8 *)(void *)(d))[4] = ((UINT8 *)(void *)(s))[3];\ - (( UINT8 *)(void *)(d))[5] = ((UINT8 *)(void *)(s))[2];\ - (( UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\ - (( UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];} +#define ACPI_MOVE_64_TO_64(d,s) {(( UINT8 *)(void *)(d))[0] = ((const UINT8 *)(const void *)(s))[7];\ + (( UINT8 *)(void *)(d))[1] = ((const UINT8 *)(const void *)(s))[6];\ + (( UINT8 *)(void *)(d))[2] = ((const UINT8 *)(const void *)(s))[5];\ + (( UINT8 *)(void *)(d))[3] = ((const UINT8 *)(const void *)(s))[4];\ + (( UINT8 *)(void *)(d))[4] = ((const UINT8 *)(const void *)(s))[3];\ + (( UINT8 *)(void *)(d))[5] = ((const UINT8 *)(const void *)(s))[2];\ + (( UINT8 *)(void *)(d))[6] = ((const UINT8 *)(const void *)(s))[1];\ + (( UINT8 *)(void *)(d))[7] = ((const UINT8 *)(const void *)(s))[0];} #else /* * Macros for little-endian machines @@ -286,14 +288,14 @@ /* No 64-bit integers */ /* 16-bit source, 16/32/64 destination */ -#define ACPI_MOVE_16_TO_16(d,s) *(UINT16 *)(void *)(d) = *(UINT16 *)(void *)(s) -#define ACPI_MOVE_16_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT16 *)(void *)(s) +#define ACPI_MOVE_16_TO_16(d,s) *(UINT16 *)(void *)(d) = *(const UINT16 *)(const void *)(s) +#define ACPI_MOVE_16_TO_32(d,s) *(UINT32 *)(void *)(d) = *(const UINT16 *)(const void *)(s) #define ACPI_MOVE_16_TO_64(d,s) ACPI_MOVE_16_TO_32(d,s) /* 32-bit source, 16/32/64 destination */ #define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ -#define ACPI_MOVE_32_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s) +#define ACPI_MOVE_32_TO_32(d,s) *(UINT32 *)(void *)(d) = *(const UINT32 *)(const void *)(s) #define ACPI_MOVE_32_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s) /* 64-bit source, 16/32/64 destination */ @@ -305,21 +307,21 @@ #else /* 16-bit source, 16/32/64 destination */ -#define ACPI_MOVE_16_TO_16(d,s) *(UINT16 *)(void *)(d) = *(UINT16 *)(void *)(s) -#define ACPI_MOVE_16_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT16 *)(void *)(s) -#define ACPI_MOVE_16_TO_64(d,s) *(UINT64 *)(void *)(d) = *(UINT16 *)(void *)(s) +#define ACPI_MOVE_16_TO_16(d,s) *(UINT16 *)(void *)(d) = *(const UINT16 *)(const void *)(s) +#define ACPI_MOVE_16_TO_32(d,s) *(UINT32 *)(void *)(d) = *(const UINT16 *)(const void *)(s) +#define ACPI_MOVE_16_TO_64(d,s) *(UINT64 *)(void *)(d) = *(const UINT16 *)(const void *)(s) /* 32-bit source, 16/32/64 destination */ #define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ -#define ACPI_MOVE_32_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s) -#define ACPI_MOVE_32_TO_64(d,s) *(UINT64 *)(void *)(d) = *(UINT32 *)(void *)(s) +#define ACPI_MOVE_32_TO_32(d,s) *(UINT32 *)(void *)(d) = *(const UINT32 *)(const void *)(s) +#define ACPI_MOVE_32_TO_64(d,s) *(UINT64 *)(void *)(d) = *(const UINT32 *)(const void *)(s) /* 64-bit source, 16/32/64 destination */ #define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ #define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ -#define ACPI_MOVE_64_TO_64(d,s) *(UINT64 *)(void *)(d) = *(UINT64 *)(void *)(s) +#define ACPI_MOVE_64_TO_64(d,s) *(UINT64 *)(void *)(d) = *(const UINT64 *)(const void *)(s) #endif #else @@ -331,8 +333,8 @@ /* 16-bit source, 16/32/64 destination */ -#define ACPI_MOVE_16_TO_16(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\ - (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];} +#define ACPI_MOVE_16_TO_16(d,s) {(( UINT8 *)(void *)(d))[0] = ((const UINT8 *)(const void *)(s))[0];\ + (( UINT8 *)(void *)(d))[1] = ((const UINT8 *)(const void *)(s))[1];} #define ACPI_MOVE_16_TO_32(d,s) {(*(UINT32 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);} #define ACPI_MOVE_16_TO_64(d,s) {(*(UINT64 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);} @@ -341,10 +343,10 @@ #define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ -#define ACPI_MOVE_32_TO_32(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\ - (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];\ - (( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[2];\ - (( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[3];} +#define ACPI_MOVE_32_TO_32(d,s) {(( UINT8 *)(void *)(d))[0] = ((const UINT8 *)(const void *)(s))[0];\ + (( UINT8 *)(void *)(d))[1] = ((const UINT8 *)(const void *)(s))[1];\ + (( UINT8 *)(void *)(d))[2] = ((const UINT8 *)(const void *)(s))[2];\ + (( UINT8 *)(void *)(d))[3] = ((const UINT8 *)(const void *)(s))[3];} #define ACPI_MOVE_32_TO_64(d,s) {(*(UINT64 *)(void *)(d)) = 0; ACPI_MOVE_32_TO_32(d,s);} @@ -352,14 +354,14 @@ #define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ #define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ -#define ACPI_MOVE_64_TO_64(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\ - (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];\ - (( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[2];\ - (( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[3];\ - (( UINT8 *)(void *)(d))[4] = ((UINT8 *)(void *)(s))[4];\ - (( UINT8 *)(void *)(d))[5] = ((UINT8 *)(void *)(s))[5];\ - (( UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[6];\ - (( UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[7];} +#define ACPI_MOVE_64_TO_64(d,s) {(( UINT8 *)(void *)(d))[0] = ((const UINT8 *)(const void *)(s))[0];\ + (( UINT8 *)(void *)(d))[1] = ((const UINT8 *)(const void *)(s))[1];\ + (( UINT8 *)(void *)(d))[2] = ((const UINT8 *)(const void *)(s))[2];\ + (( UINT8 *)(void *)(d))[3] = ((const UINT8 *)(const void *)(s))[3];\ + (( UINT8 *)(void *)(d))[4] = ((const UINT8 *)(const void *)(s))[4];\ + (( UINT8 *)(void *)(d))[5] = ((const UINT8 *)(const void *)(s))[5];\ + (( UINT8 *)(void *)(d))[6] = ((const UINT8 *)(const void *)(s))[6];\ + (( UINT8 *)(void *)(d))[7] = ((const UINT8 *)(const void *)(s))[7];} #endif #endif diff --git a/sys/dev/acpi/acpica/Subsystem/acnamesp.h b/sys/dev/acpi/acpica/Subsystem/acnamesp.h index 7b53b89bf2e9..b3247138adf2 100644 --- a/sys/dev/acpi/acpica/Subsystem/acnamesp.h +++ b/sys/dev/acpi/acpica/Subsystem/acnamesp.h @@ -211,7 +211,7 @@ AcpiNsRootInitialize ( ACPI_STATUS AcpiNsLookup ( ACPI_GENERIC_STATE *ScopeInfo, - char *Name, + const char *Name, ACPI_OBJECT_TYPE Type, ACPI_INTERPRETER_MODE InterpreterMode, UINT32 Flags, @@ -302,12 +302,12 @@ AcpiNsEvaluateByHandle ( ACPI_STATUS AcpiNsEvaluateByName ( - char *Pathname, + const char *Pathname, ACPI_PARAMETER_INFO *Info); ACPI_STATUS AcpiNsEvaluateRelative ( - char *Pathname, + const char *Pathname, ACPI_PARAMETER_INFO *Info); @@ -334,11 +334,11 @@ AcpiNsHandleToPathname ( BOOLEAN AcpiNsPatternMatch ( ACPI_NAMESPACE_NODE *ObjNode, - char *SearchFor); + const char *SearchFor); ACPI_STATUS AcpiNsGetNodeByPath ( - char *ExternalPathname, + const char *ExternalPathname, ACPI_NAMESPACE_NODE *InPrefixNode, UINT32 Flags, ACPI_NAMESPACE_NODE **OutNode); @@ -428,26 +428,26 @@ AcpiNsLocal ( void AcpiNsReportError ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId, - char *InternalName, + const char *InternalName, ACPI_STATUS LookupStatus); void AcpiNsReportMethodError ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId, - char *Message, + const char *Message, ACPI_NAMESPACE_NODE *Node, - char *Path, + const char *Path, ACPI_STATUS LookupStatus); void AcpiNsPrintNodePathname ( ACPI_NAMESPACE_NODE *Node, - char *Msg); + const char *Msg); ACPI_STATUS AcpiNsBuildInternalName ( @@ -459,13 +459,13 @@ AcpiNsGetInternalNameLength ( ACPI_STATUS AcpiNsInternalizeName ( - char *DottedName, + const char *DottedName, char **ConvertedName); ACPI_STATUS AcpiNsExternalizeName ( UINT32 InternalNameLength, - char *InternalName, + const char *InternalName, UINT32 *ConvertedNameLength, char **ConvertedName); diff --git a/sys/dev/acpi/acpica/Subsystem/acparser.h b/sys/dev/acpi/acpica/Subsystem/acparser.h index bd812eda4977..a3cf061f8098 100644 --- a/sys/dev/acpi/acpica/Subsystem/acparser.h +++ b/sys/dev/acpi/acpica/Subsystem/acparser.h @@ -211,7 +211,7 @@ const ACPI_OPCODE_INFO * AcpiPsGetOpcodeInfo ( UINT16 Opcode); -char * +const char * AcpiPsGetOpcodeName ( UINT16 Opcode); diff --git a/sys/dev/acpi/acpica/Subsystem/acpiosxf.h b/sys/dev/acpi/acpica/Subsystem/acpiosxf.h index d41ca0e5bed2..dfe54d39e6dd 100644 --- a/sys/dev/acpi/acpica/Subsystem/acpiosxf.h +++ b/sys/dev/acpi/acpica/Subsystem/acpiosxf.h @@ -373,7 +373,7 @@ AcpiOsGetTimer ( ACPI_STATUS AcpiOsSignal ( UINT32 Function, - void *Info); + const void *Info); /* * Debug print routines diff --git a/sys/dev/acpi/acpica/Subsystem/acpixf.h b/sys/dev/acpi/acpica/Subsystem/acpixf.h index 29519bd0aefb..8ac75870566f 100644 --- a/sys/dev/acpi/acpica/Subsystem/acpixf.h +++ b/sys/dev/acpi/acpica/Subsystem/acpixf.h @@ -220,7 +220,7 @@ AcpiGetTable ( ACPI_STATUS AcpiGetFirmwareTable ( - ACPI_STRING Signature, + ACPI_CONST_STRING Signature, UINT32 Instance, UINT32 Flags, ACPI_TABLE_HEADER **TablePointer); @@ -254,7 +254,7 @@ AcpiGetName ( ACPI_STATUS AcpiGetHandle ( ACPI_HANDLE Parent, - ACPI_STRING Pathname, + ACPI_CONST_STRING Pathname, ACPI_HANDLE *RetHandle); ACPI_STATUS @@ -281,14 +281,14 @@ AcpiGetData ( ACPI_STATUS AcpiEvaluateObject ( ACPI_HANDLE Object, - ACPI_STRING Pathname, + ACPI_CONST_STRING Pathname, ACPI_OBJECT_LIST *ParameterObjects, ACPI_BUFFER *ReturnObjectBuffer); ACPI_STATUS AcpiEvaluateObjectTyped ( ACPI_HANDLE Object, - ACPI_STRING Pathname, + ACPI_CONST_STRING Pathname, ACPI_OBJECT_LIST *ExternalParams, ACPI_BUFFER *ReturnBuffer, ACPI_OBJECT_TYPE ReturnType); @@ -472,7 +472,7 @@ AcpiGetPossibleResources( ACPI_STATUS AcpiWalkResources ( ACPI_HANDLE DeviceHandle, - char *Path, + const char *Path, ACPI_WALK_RESOURCE_CALLBACK UserFunction, void *Context); diff --git a/sys/dev/acpi/acpica/Subsystem/acresrc.h b/sys/dev/acpi/acpica/Subsystem/acresrc.h index 9936cf6645f9..27720ccf5483 100644 --- a/sys/dev/acpi/acpica/Subsystem/acresrc.h +++ b/sys/dev/acpi/acpica/Subsystem/acresrc.h @@ -141,7 +141,7 @@ AcpiRsGetPrsMethodData ( ACPI_STATUS AcpiRsGetMethodData ( ACPI_HANDLE Handle, - char *Path, + const char *Path, ACPI_BUFFER *RetBuffer); ACPI_STATUS diff --git a/sys/dev/acpi/acpica/Subsystem/actbl.h b/sys/dev/acpi/acpica/Subsystem/actbl.h index 18a240ad71c7..df3771f911a8 100644 --- a/sys/dev/acpi/acpica/Subsystem/actbl.h +++ b/sys/dev/acpi/acpica/Subsystem/actbl.h @@ -403,8 +403,8 @@ typedef struct smart_battery_table typedef struct acpi_table_support { - char *Name; - char *Signature; + const char *Name; + const char *Signature; void **GlobalPtr; UINT8 SigLength; UINT8 Flags; diff --git a/sys/dev/acpi/acpica/Subsystem/actypes.h b/sys/dev/acpi/acpica/Subsystem/actypes.h index 44719dc2c5d8..10f689b97a69 100644 --- a/sys/dev/acpi/acpica/Subsystem/actypes.h +++ b/sys/dev/acpi/acpica/Subsystem/actypes.h @@ -344,6 +344,7 @@ typedef struct acpi_pointer typedef UINT32 ACPI_STATUS; /* All ACPI Exceptions */ typedef UINT32 ACPI_NAME; /* 4-byte ACPI name */ typedef char * ACPI_STRING; /* Null terminated ASCII string */ +typedef const char * ACPI_CONST_STRING; /* Null terminated ASCII string */ typedef void * ACPI_HANDLE; /* Actually a ptr to an Node */ typedef struct uint64_struct diff --git a/sys/dev/acpi/acpica/Subsystem/acutils.h b/sys/dev/acpi/acpica/Subsystem/acutils.h index 2403bb3c8bf9..094cf7f33569 100644 --- a/sys/dev/acpi/acpica/Subsystem/acutils.h +++ b/sys/dev/acpi/acpica/Subsystem/acutils.h @@ -161,27 +161,27 @@ AcpiUtGetMutexName ( #endif -char * +const char * AcpiUtGetTypeName ( ACPI_OBJECT_TYPE Type); -char * +const char * AcpiUtGetNodeName ( void *Object); -char * +const char * AcpiUtGetDescriptorName ( void *Object); -char * +const char * AcpiUtGetObjectTypeName ( ACPI_OPERAND_OBJECT *ObjDesc); -char * +const char * AcpiUtGetRegionName ( UINT8 SpaceId); -char * +const char * AcpiUtGetEventName ( UINT32 EventId); @@ -425,19 +425,19 @@ AcpiUtPtrExit ( void AcpiUtReportInfo ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId); void AcpiUtReportError ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId); void AcpiUtReportWarning ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId); @@ -499,13 +499,13 @@ AcpiUtOsiImplementation ( ACPI_STATUS AcpiUtEvaluateObject ( ACPI_NAMESPACE_NODE *PrefixNode, - char *Path, + const char *Path, UINT32 ExpectedReturnBtypes, ACPI_OPERAND_OBJECT **ReturnDesc); ACPI_STATUS AcpiUtEvaluateNumericObject ( - char *ObjectName, + const char *ObjectName, ACPI_NAMESPACE_NODE *DeviceNode, ACPI_INTEGER *Address); @@ -540,14 +540,14 @@ AcpiUtExecute_Sxds ( */ ACPI_OPERAND_OBJECT * AcpiUtCreateInternalObjectDbg ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId, ACPI_OBJECT_TYPE Type); void * AcpiUtAllocateObjectDescDbg ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId); @@ -768,14 +768,14 @@ void * AcpiUtAllocate ( ACPI_SIZE Size, UINT32 Component, - char *Module, + const char *Module, UINT32 Line); void * AcpiUtCallocate ( ACPI_SIZE Size, UINT32 Component, - char *Module, + const char *Module, UINT32 Line); #ifdef ACPI_DBG_TRACK_ALLOCATIONS @@ -783,21 +783,21 @@ void * AcpiUtAllocateAndTrack ( ACPI_SIZE Size, UINT32 Component, - char *Module, + const char *Module, UINT32 Line); void * AcpiUtCallocateAndTrack ( ACPI_SIZE Size, UINT32 Component, - char *Module, + const char *Module, UINT32 Line); void AcpiUtFreeAndTrack ( void *Address, UINT32 Component, - char *Module, + const char *Module, UINT32 Line); void @@ -807,7 +807,7 @@ AcpiUtDumpAllocationInfo ( void AcpiUtDumpAllocations ( UINT32 Component, - char *Module); + const char *Module); #endif #endif /* _ACUTILS_H */ diff --git a/sys/dev/acpi/acpica/Subsystem/evrgnini.c b/sys/dev/acpi/acpica/Subsystem/evrgnini.c index bcd8f1bfe36b..80a80eb3d0a4 100644 --- a/sys/dev/acpi/acpica/Subsystem/evrgnini.c +++ b/sys/dev/acpi/acpica/Subsystem/evrgnini.c @@ -116,7 +116,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: evrgnini.c,v 1.11 2005/05/02 14:52:09 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: evrgnini.c,v 1.12 2005/05/29 20:56:02 christos Exp $"); #define __EVRGNINI_C__ @@ -545,7 +545,7 @@ AcpiEvInitializeRegion ( ACPI_NAMESPACE_NODE *Node; ACPI_STATUS Status; ACPI_NAMESPACE_NODE *MethodNode; - ACPI_NAME *RegNamePtr = (ACPI_NAME *) METHOD_NAME__REG; + const ACPI_NAME *RegNamePtr = (const ACPI_NAME *) METHOD_NAME__REG; ACPI_OPERAND_OBJECT *RegionObj2; diff --git a/sys/dev/acpi/acpica/Subsystem/hwregs.c b/sys/dev/acpi/acpica/Subsystem/hwregs.c index 1ebb650aa31f..926aeaed0cad 100644 --- a/sys/dev/acpi/acpica/Subsystem/hwregs.c +++ b/sys/dev/acpi/acpica/Subsystem/hwregs.c @@ -117,7 +117,7 @@ *****************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: hwregs.c,v 1.14 2005/05/02 14:52:09 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hwregs.c,v 1.15 2005/05/29 20:56:02 christos Exp $"); #define __HWREGS_C__ @@ -221,7 +221,7 @@ AcpiGetSleepTypeData ( { ACPI_STATUS Status = AE_OK; ACPI_PARAMETER_INFO Info; - char *SleepStateName; + const char *SleepStateName; ACPI_FUNCTION_TRACE ("AcpiGetSleepTypeData"); @@ -239,7 +239,7 @@ AcpiGetSleepTypeData ( Info.Parameters = NULL; Info.ReturnObject = NULL; - SleepStateName = (char *) AcpiGbl_SleepStateNames[SleepState]; + SleepStateName = AcpiGbl_SleepStateNames[SleepState]; Status = AcpiNsEvaluateByName (SleepStateName, &Info); if (ACPI_FAILURE (Status)) diff --git a/sys/dev/acpi/acpica/Subsystem/nsaccess.c b/sys/dev/acpi/acpica/Subsystem/nsaccess.c index d8bfe44de446..2e866c4e0f9e 100644 --- a/sys/dev/acpi/acpica/Subsystem/nsaccess.c +++ b/sys/dev/acpi/acpica/Subsystem/nsaccess.c @@ -115,7 +115,7 @@ *****************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: nsaccess.c,v 1.11 2005/05/02 14:52:09 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nsaccess.c,v 1.12 2005/05/29 20:56:02 christos Exp $"); #define __NSACCESS_C__ @@ -221,7 +221,8 @@ AcpiNsRootInitialize ( if (!Val) { - Val = InitVal->Val; + /*XXXUNCONST*/ + Val = (void *)(intptr_t)InitVal->Val; } /* @@ -380,7 +381,7 @@ UnlockAndExit: ACPI_STATUS AcpiNsLookup ( ACPI_GENERIC_STATE *ScopeInfo, - char *Pathname, + const char *Pathname, ACPI_OBJECT_TYPE Type, ACPI_INTERPRETER_MODE InterpreterMode, UINT32 Flags, @@ -388,7 +389,7 @@ AcpiNsLookup ( ACPI_NAMESPACE_NODE **ReturnNode) { ACPI_STATUS Status; - char *Path = Pathname; + const char *Path = Pathname; ACPI_NAMESPACE_NODE *PrefixNode; ACPI_NAMESPACE_NODE *CurrentNode = NULL; ACPI_NAMESPACE_NODE *ThisNode = NULL; diff --git a/sys/dev/acpi/acpica/Subsystem/nseval.c b/sys/dev/acpi/acpica/Subsystem/nseval.c index c84bc0cf0d1b..93ba68f1e758 100644 --- a/sys/dev/acpi/acpica/Subsystem/nseval.c +++ b/sys/dev/acpi/acpica/Subsystem/nseval.c @@ -117,7 +117,7 @@ *****************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: nseval.c,v 1.12 2005/05/02 14:52:09 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nseval.c,v 1.13 2005/05/29 20:56:02 christos Exp $"); #define __NSEVAL_C__ @@ -164,7 +164,7 @@ AcpiNsGetObjectValue ( ACPI_STATUS AcpiNsEvaluateRelative ( - char *Pathname, + const char *Pathname, ACPI_PARAMETER_INFO *Info) { ACPI_STATUS Status; @@ -274,7 +274,7 @@ Cleanup1: ACPI_STATUS AcpiNsEvaluateByName ( - char *Pathname, + const char *Pathname, ACPI_PARAMETER_INFO *Info) { ACPI_STATUS Status; diff --git a/sys/dev/acpi/acpica/Subsystem/nsutils.c b/sys/dev/acpi/acpica/Subsystem/nsutils.c index a670b086e0d9..9d496f96fcf5 100644 --- a/sys/dev/acpi/acpica/Subsystem/nsutils.c +++ b/sys/dev/acpi/acpica/Subsystem/nsutils.c @@ -116,7 +116,7 @@ *****************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: nsutils.c,v 1.12 2005/05/02 14:52:09 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nsutils.c,v 1.13 2005/05/29 20:56:02 christos Exp $"); #define __NSUTILS_C__ @@ -159,10 +159,10 @@ AcpiNsFindParentName ( void AcpiNsReportError ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId, - char *InternalName, + const char *InternalName, ACPI_STATUS LookupStatus) { ACPI_STATUS Status; @@ -177,7 +177,7 @@ AcpiNsReportError ( /* There is a non-ascii character in the name */ AcpiOsPrintf ("[0x%4.4X] (NON-ASCII)\n", - *(ACPI_CAST_PTR (UINT32, InternalName))); + *(ACPI_CAST_CONST_PTR (UINT32, InternalName))); } else { @@ -228,12 +228,12 @@ AcpiNsReportError ( void AcpiNsReportMethodError ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId, - char *Message, + const char *Message, ACPI_NAMESPACE_NODE *PrefixNode, - char *Path, + const char *Path, ACPI_STATUS MethodStatus) { ACPI_STATUS Status; @@ -272,7 +272,7 @@ AcpiNsReportMethodError ( void AcpiNsPrintNodePathname ( ACPI_NAMESPACE_NODE *Node, - char *Message) + const char *Message) { ACPI_BUFFER Buffer; ACPI_STATUS Status; @@ -423,7 +423,7 @@ void AcpiNsGetInternalNameLength ( ACPI_NAMESTRING_INFO *Info) { - char *NextExternalChar; + const char *NextExternalChar; UINT32 i; @@ -502,7 +502,7 @@ AcpiNsBuildInternalName ( { UINT32 NumSegments = Info->NumSegments; char *InternalName = Info->InternalName; - char *ExternalName = Info->NextExternalChar; + const char *ExternalName = Info->NextExternalChar; char *Result = NULL; ACPI_NATIVE_UINT i; @@ -636,7 +636,7 @@ AcpiNsBuildInternalName ( ACPI_STATUS AcpiNsInternalizeName ( - char *ExternalName, + const char *ExternalName, char **ConvertedName) { char *InternalName; @@ -702,7 +702,7 @@ AcpiNsInternalizeName ( ACPI_STATUS AcpiNsExternalizeName ( UINT32 InternalNameLength, - char *InternalName, + const char *InternalName, UINT32 *ConvertedNameLength, char **ConvertedName) { @@ -1052,7 +1052,7 @@ AcpiNsOpensScope ( ACPI_STATUS AcpiNsGetNodeByPath ( - char *Pathname, + const char *Pathname, ACPI_NAMESPACE_NODE *StartNode, UINT32 Flags, ACPI_NAMESPACE_NODE **ReturnNode) diff --git a/sys/dev/acpi/acpica/Subsystem/nsxfeval.c b/sys/dev/acpi/acpica/Subsystem/nsxfeval.c index d5761d386668..eed925b4c9a9 100644 --- a/sys/dev/acpi/acpica/Subsystem/nsxfeval.c +++ b/sys/dev/acpi/acpica/Subsystem/nsxfeval.c @@ -117,7 +117,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: nsxfeval.c,v 1.6 2005/05/02 14:52:09 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nsxfeval.c,v 1.7 2005/05/29 20:56:02 christos Exp $"); #define __NSXFEVAL_C__ @@ -154,7 +154,7 @@ __KERNEL_RCSID(0, "$NetBSD: nsxfeval.c,v 1.6 2005/05/02 14:52:09 kochi Exp $"); ACPI_STATUS AcpiEvaluateObjectTyped ( ACPI_HANDLE Handle, - ACPI_STRING Pathname, + ACPI_CONST_STRING Pathname, ACPI_OBJECT_LIST *ExternalParams, ACPI_BUFFER *ReturnBuffer, ACPI_OBJECT_TYPE ReturnType) @@ -253,7 +253,7 @@ AcpiEvaluateObjectTyped ( ACPI_STATUS AcpiEvaluateObject ( ACPI_HANDLE Handle, - ACPI_STRING Pathname, + ACPI_CONST_STRING Pathname, ACPI_OBJECT_LIST *ExternalParams, ACPI_BUFFER *ReturnBuffer) { diff --git a/sys/dev/acpi/acpica/Subsystem/nsxfname.c b/sys/dev/acpi/acpica/Subsystem/nsxfname.c index 80a7fde23edf..4909cd1404c3 100644 --- a/sys/dev/acpi/acpica/Subsystem/nsxfname.c +++ b/sys/dev/acpi/acpica/Subsystem/nsxfname.c @@ -116,7 +116,7 @@ *****************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: nsxfname.c,v 1.11 2005/05/02 14:52:09 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nsxfname.c,v 1.12 2005/05/29 20:56:02 christos Exp $"); #define __NSXFNAME_C__ @@ -149,7 +149,7 @@ __KERNEL_RCSID(0, "$NetBSD: nsxfname.c,v 1.11 2005/05/02 14:52:09 kochi Exp $"); ACPI_STATUS AcpiGetHandle ( ACPI_HANDLE Parent, - ACPI_STRING Pathname, + ACPI_CONST_STRING Pathname, ACPI_HANDLE *RetHandle) { ACPI_STATUS Status; diff --git a/sys/dev/acpi/acpica/Subsystem/psopcode.c b/sys/dev/acpi/acpica/Subsystem/psopcode.c index 220782c0d42a..594043bc2827 100644 --- a/sys/dev/acpi/acpica/Subsystem/psopcode.c +++ b/sys/dev/acpi/acpica/Subsystem/psopcode.c @@ -116,7 +116,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: psopcode.c,v 1.11 2005/05/02 14:52:09 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: psopcode.c,v 1.12 2005/05/29 20:56:02 christos Exp $"); #include "acpi.h" #include "acparser.h" @@ -551,7 +551,7 @@ AcpiPsGetOpcodeInfo ( * ******************************************************************************/ -char * +const char * AcpiPsGetOpcodeName ( UINT16 Opcode) { diff --git a/sys/dev/acpi/acpica/Subsystem/rsutils.c b/sys/dev/acpi/acpica/Subsystem/rsutils.c index d0c05d7416ff..b1fcfad5e8f7 100644 --- a/sys/dev/acpi/acpica/Subsystem/rsutils.c +++ b/sys/dev/acpi/acpica/Subsystem/rsutils.c @@ -116,7 +116,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: rsutils.c,v 1.11 2005/05/02 14:52:10 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rsutils.c,v 1.12 2005/05/29 20:56:02 christos Exp $"); #define __RSUTILS_C__ @@ -315,7 +315,7 @@ AcpiRsGetPrsMethodData ( ACPI_STATUS AcpiRsGetMethodData ( ACPI_HANDLE Handle, - char *Path, + const char *Path, ACPI_BUFFER *RetBuffer) { ACPI_OPERAND_OBJECT *ObjDesc; diff --git a/sys/dev/acpi/acpica/Subsystem/rsxface.c b/sys/dev/acpi/acpica/Subsystem/rsxface.c index 34a365e1b9a9..7e66fb4155f7 100644 --- a/sys/dev/acpi/acpica/Subsystem/rsxface.c +++ b/sys/dev/acpi/acpica/Subsystem/rsxface.c @@ -116,7 +116,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: rsxface.c,v 1.11 2005/05/02 14:52:10 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rsxface.c,v 1.12 2005/05/29 20:56:02 christos Exp $"); #define __RSXFACE_C__ @@ -333,7 +333,7 @@ AcpiGetPossibleResources ( ACPI_STATUS AcpiWalkResources ( ACPI_HANDLE DeviceHandle, - char *Path, + const char *Path, ACPI_WALK_RESOURCE_CALLBACK UserFunction, void *Context) { diff --git a/sys/dev/acpi/acpica/Subsystem/tbgetall.c b/sys/dev/acpi/acpica/Subsystem/tbgetall.c index a18c04f29ae1..7c2d65c7396d 100644 --- a/sys/dev/acpi/acpica/Subsystem/tbgetall.c +++ b/sys/dev/acpi/acpica/Subsystem/tbgetall.c @@ -115,7 +115,7 @@ *****************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: tbgetall.c,v 1.6 2005/05/02 14:52:10 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tbgetall.c,v 1.7 2005/05/29 20:56:02 christos Exp $"); #define __TBGETALL_C__ @@ -136,7 +136,7 @@ AcpiTbGetPrimaryTable ( static ACPI_STATUS AcpiTbGetSecondaryTable ( ACPI_POINTER *Address, - ACPI_STRING Signature, + ACPI_CONST_STRING Signature, ACPI_TABLE_DESC *TableInfo); @@ -226,7 +226,7 @@ AcpiTbGetPrimaryTable ( static ACPI_STATUS AcpiTbGetSecondaryTable ( ACPI_POINTER *Address, - ACPI_STRING Signature, + ACPI_CONST_STRING Signature, ACPI_TABLE_DESC *TableInfo) { ACPI_STATUS Status; diff --git a/sys/dev/acpi/acpica/Subsystem/tbxfroot.c b/sys/dev/acpi/acpica/Subsystem/tbxfroot.c index 12d32f3fd414..d3bb50579ebc 100644 --- a/sys/dev/acpi/acpica/Subsystem/tbxfroot.c +++ b/sys/dev/acpi/acpica/Subsystem/tbxfroot.c @@ -115,7 +115,7 @@ *****************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: tbxfroot.c,v 1.12 2005/05/02 14:52:10 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tbxfroot.c,v 1.13 2005/05/29 20:56:02 christos Exp $"); #define __TBXFROOT_C__ @@ -247,7 +247,7 @@ AcpiTbFindTable ( ACPI_STATUS AcpiGetFirmwareTable ( - ACPI_STRING Signature, + ACPI_CONST_STRING Signature, UINT32 Instance, UINT32 Flags, ACPI_TABLE_HEADER **TablePointer) diff --git a/sys/dev/acpi/acpica/Subsystem/utalloc.c b/sys/dev/acpi/acpica/Subsystem/utalloc.c index ef740ddb7acd..bf29f31490e7 100644 --- a/sys/dev/acpi/acpica/Subsystem/utalloc.c +++ b/sys/dev/acpi/acpica/Subsystem/utalloc.c @@ -115,7 +115,7 @@ *****************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: utalloc.c,v 1.11 2005/05/02 14:52:10 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: utalloc.c,v 1.12 2005/05/29 20:56:02 christos Exp $"); #define __UTALLOC_C__ @@ -499,7 +499,7 @@ void * AcpiUtAllocate ( ACPI_SIZE Size, UINT32 Component, - char *Module, + const char *Module, UINT32 Line) { void *Allocation; @@ -551,7 +551,7 @@ void * AcpiUtCallocate ( ACPI_SIZE Size, UINT32 Component, - char *Module, + const char *Module, UINT32 Line) { void *Allocation; diff --git a/sys/dev/acpi/acpica/Subsystem/uteval.c b/sys/dev/acpi/acpica/Subsystem/uteval.c index 835c9df3067b..b100933e3121 100644 --- a/sys/dev/acpi/acpica/Subsystem/uteval.c +++ b/sys/dev/acpi/acpica/Subsystem/uteval.c @@ -115,7 +115,7 @@ *****************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: uteval.c,v 1.11 2005/05/02 14:52:10 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uteval.c,v 1.12 2005/05/29 20:56:02 christos Exp $"); #define __UTEVAL_C__ @@ -187,7 +187,7 @@ AcpiUtOsiImplementation ( for (i = 0; i < ACPI_NUM_OSI_STRINGS; i++) { if (!ACPI_STRCMP (StringDesc->String.Pointer, - (char *) AcpiGbl_ValidOsiStrings[i])) + AcpiGbl_ValidOsiStrings[i])) { /* This string is supported */ @@ -223,7 +223,7 @@ AcpiUtOsiImplementation ( ACPI_STATUS AcpiUtEvaluateObject ( ACPI_NAMESPACE_NODE *PrefixNode, - char *Path, + const char *Path, UINT32 ExpectedReturnBtypes, ACPI_OPERAND_OBJECT **ReturnDesc) { @@ -354,7 +354,7 @@ AcpiUtEvaluateObject ( ACPI_STATUS AcpiUtEvaluateNumericObject ( - char *ObjectName, + const char *ObjectName, ACPI_NAMESPACE_NODE *DeviceNode, ACPI_INTEGER *Address) { @@ -791,7 +791,7 @@ AcpiUtExecute_Sxds ( { Highest[i] = 0xFF; Status = AcpiUtEvaluateObject (DeviceNode, - (char *) AcpiGbl_HighestDstateNames[i], + AcpiGbl_HighestDstateNames[i], ACPI_BTYPE_INTEGER, &ObjDesc); if (ACPI_FAILURE (Status)) { @@ -799,7 +799,7 @@ AcpiUtExecute_Sxds ( { ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s on Device %4.4s, %s\n", - (char *) AcpiGbl_HighestDstateNames[i], + AcpiGbl_HighestDstateNames[i], AcpiUtGetNodeName (DeviceNode), AcpiFormatException (Status))); diff --git a/sys/dev/acpi/acpica/Subsystem/utglobal.c b/sys/dev/acpi/acpica/Subsystem/utglobal.c index 1701f8288146..d5d525289e11 100644 --- a/sys/dev/acpi/acpica/Subsystem/utglobal.c +++ b/sys/dev/acpi/acpica/Subsystem/utglobal.c @@ -115,7 +115,7 @@ *****************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: utglobal.c,v 1.12 2005/05/02 14:52:10 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: utglobal.c,v 1.13 2005/05/29 20:56:02 christos Exp $"); #define __UTGLOBAL_C__ #define DEFINE_ACPI_GLOBALS @@ -509,7 +509,7 @@ const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] = }; -char * +const char * AcpiUtGetRegionName ( UINT8 SpaceId) { @@ -523,7 +523,7 @@ AcpiUtGetRegionName ( return ("InvalidSpaceId"); } - return ((char *) AcpiGbl_RegionTypes[SpaceId]); + return (AcpiGbl_RegionTypes[SpaceId]); } @@ -551,7 +551,7 @@ static const char *AcpiGbl_EventTypes[ACPI_NUM_FIXED_EVENTS] = }; -char * +const char * AcpiUtGetEventName ( UINT32 EventId) { @@ -561,7 +561,7 @@ AcpiUtGetEventName ( return ("InvalidEventID"); } - return ((char *) AcpiGbl_EventTypes[EventId]); + return (AcpiGbl_EventTypes[EventId]); } @@ -625,21 +625,21 @@ static const char *AcpiGbl_NsTypeNames[] = }; -char * +const char * AcpiUtGetTypeName ( ACPI_OBJECT_TYPE Type) { if (Type > ACPI_TYPE_INVALID) { - return ((char *) AcpiGbl_BadType); + return (AcpiGbl_BadType); } - return ((char *) AcpiGbl_NsTypeNames[Type]); + return (AcpiGbl_NsTypeNames[Type]); } -char * +const char * AcpiUtGetObjectTypeName ( ACPI_OPERAND_OBJECT *ObjDesc) { @@ -665,7 +665,7 @@ AcpiUtGetObjectTypeName ( * ******************************************************************************/ -char * +const char * AcpiUtGetNodeName ( void *Object) { @@ -742,7 +742,7 @@ static const char *AcpiGbl_DescTypeNames[] = }; -char * +const char * AcpiUtGetDescriptorName ( void *Object) { @@ -754,10 +754,10 @@ AcpiUtGetDescriptorName ( if (ACPI_GET_DESCRIPTOR_TYPE (Object) > ACPI_DESC_TYPE_MAX) { - return ((char *) AcpiGbl_BadType); + return (AcpiGbl_BadType); } - return ((char *) AcpiGbl_DescTypeNames[ACPI_GET_DESCRIPTOR_TYPE (Object)]); + return (AcpiGbl_DescTypeNames[ACPI_GET_DESCRIPTOR_TYPE (Object)]); } diff --git a/sys/dev/acpi/acpica/Subsystem/utinit.c b/sys/dev/acpi/acpica/Subsystem/utinit.c index 25d9b94b2b8e..e8216fc95a43 100644 --- a/sys/dev/acpi/acpica/Subsystem/utinit.c +++ b/sys/dev/acpi/acpica/Subsystem/utinit.c @@ -116,7 +116,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: utinit.c,v 1.11 2005/05/02 14:52:10 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: utinit.c,v 1.12 2005/05/29 20:56:02 christos Exp $"); #define __UTINIT_C__ @@ -131,7 +131,7 @@ __KERNEL_RCSID(0, "$NetBSD: utinit.c,v 1.11 2005/05/02 14:52:10 kochi Exp $"); static void AcpiUtFadtRegisterError ( - char *RegisterName, + const char *RegisterName, UINT32 Value, ACPI_SIZE Offset); @@ -155,7 +155,7 @@ static void AcpiUtTerminate ( static void AcpiUtFadtRegisterError ( - char *RegisterName, + const char *RegisterName, UINT32 Value, ACPI_SIZE Offset) { diff --git a/sys/dev/acpi/acpica/Subsystem/utmisc.c b/sys/dev/acpi/acpica/Subsystem/utmisc.c index e9ed757af60a..879119a742a9 100644 --- a/sys/dev/acpi/acpica/Subsystem/utmisc.c +++ b/sys/dev/acpi/acpica/Subsystem/utmisc.c @@ -116,7 +116,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: utmisc.c,v 1.11 2005/05/02 14:52:10 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: utmisc.c,v 1.12 2005/05/29 20:56:02 christos Exp $"); #define __UTMISC_C__ @@ -1621,7 +1621,7 @@ AcpiUtGetResourceEndTag ( void AcpiUtReportError ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId) { @@ -1646,7 +1646,7 @@ AcpiUtReportError ( void AcpiUtReportWarning ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId) { @@ -1671,7 +1671,7 @@ AcpiUtReportWarning ( void AcpiUtReportInfo ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId) { diff --git a/sys/dev/acpi/acpica/Subsystem/utobject.c b/sys/dev/acpi/acpica/Subsystem/utobject.c index 7eac38ef980f..637c7bd778c1 100644 --- a/sys/dev/acpi/acpica/Subsystem/utobject.c +++ b/sys/dev/acpi/acpica/Subsystem/utobject.c @@ -115,7 +115,7 @@ *****************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: utobject.c,v 1.13 2005/05/02 14:52:10 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: utobject.c,v 1.14 2005/05/29 20:56:02 christos Exp $"); #define __UTOBJECT_C__ @@ -170,7 +170,7 @@ AcpiUtGetElementLength ( ACPI_OPERAND_OBJECT * AcpiUtCreateInternalObjectDbg ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId, ACPI_OBJECT_TYPE Type) @@ -415,7 +415,7 @@ AcpiUtValidInternalObject ( void * AcpiUtAllocateObjectDescDbg ( - char *ModuleName, + const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId) { diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h index 1ff0d41c89d8..81aa78916e68 100644 --- a/sys/dev/acpi/acpivar.h +++ b/sys/dev/acpi/acpivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: acpivar.h,v 1.21 2005/05/02 14:54:00 kochi Exp $ */ +/* $NetBSD: acpivar.h,v 1.22 2005/05/29 20:56:02 christos Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -262,9 +262,9 @@ int acpi_probe(void); int acpi_match_hid(ACPI_DEVICE_INFO *, const char * const *); void acpi_set_wake_gpe(ACPI_HANDLE); -ACPI_STATUS acpi_eval_integer(ACPI_HANDLE, char *, ACPI_INTEGER *); -ACPI_STATUS acpi_eval_string(ACPI_HANDLE, char *, char **); -ACPI_STATUS acpi_eval_struct(ACPI_HANDLE, char *, ACPI_BUFFER *); +ACPI_STATUS acpi_eval_integer(ACPI_HANDLE, const char *, ACPI_INTEGER *); +ACPI_STATUS acpi_eval_string(ACPI_HANDLE, const char *, char **); +ACPI_STATUS acpi_eval_struct(ACPI_HANDLE, const char *, ACPI_BUFFER *); ACPI_STATUS acpi_foreach_package_object(ACPI_OBJECT *, ACPI_STATUS (*)(ACPI_OBJECT *, void *), void *); @@ -272,7 +272,7 @@ ACPI_STATUS acpi_get(ACPI_HANDLE, ACPI_BUFFER *, ACPI_STATUS (*)(ACPI_HANDLE, ACPI_BUFFER *)); const char* acpi_name(ACPI_HANDLE); -ACPI_STATUS acpi_resource_parse(struct device *, ACPI_HANDLE, char *, +ACPI_STATUS acpi_resource_parse(struct device *, ACPI_HANDLE, const char *, void *, const struct acpi_resource_parse_ops *); void acpi_resource_print(struct device *, struct acpi_resources *); void acpi_resource_cleanup(struct acpi_resources *); diff --git a/sys/dev/acpi/fdc_acpi.c b/sys/dev/acpi/fdc_acpi.c index 2d76f1d4493b..3e43ee13d2b1 100644 --- a/sys/dev/acpi/fdc_acpi.c +++ b/sys/dev/acpi/fdc_acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: fdc_acpi.c,v 1.23 2004/10/28 07:07:39 yamt Exp $ */ +/* $NetBSD: fdc_acpi.c,v 1.24 2005/05/29 20:56:02 christos Exp $ */ /* * Copyright (c) 2002 Jared D. McNeill @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdc_acpi.c,v 1.23 2004/10/28 07:07:39 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdc_acpi.c,v 1.24 2005/05/29 20:56:02 christos Exp $"); #include "rnd.h" @@ -233,12 +233,12 @@ fdc_acpi_enumerate(struct fdc_acpi_softc *asc) { struct fdc_softc *sc = &asc->sc_fdc; ACPI_OBJECT *fde; - ACPI_BUFFER buf; + ACPI_BUFFER abuf; ACPI_STATUS rv; UINT32 *p; int i, drives = -1; - rv = acpi_eval_struct(asc->sc_node->ad_handle, "_FDE", &buf); + rv = acpi_eval_struct(asc->sc_node->ad_handle, "_FDE", &abuf); if (ACPI_FAILURE(rv)) { #ifdef ACPI_FDC_DEBUG printf("%s: failed to evaluate _FDE: %s\n", @@ -246,7 +246,7 @@ fdc_acpi_enumerate(struct fdc_acpi_softc *asc) #endif return drives; } - fde = (ACPI_OBJECT *)buf.Pointer; + fde = (ACPI_OBJECT *)abuf.Pointer; if (fde->Type != ACPI_TYPE_BUFFER) { printf("%s: expected BUFFER, got %d\n", sc->sc_dev.dv_xname, fde->Type); @@ -285,7 +285,7 @@ fdc_acpi_enumerate(struct fdc_acpi_softc *asc) */ out: - AcpiOsFree(buf.Pointer); + AcpiOsFree(abuf.Pointer); return drives; } @@ -294,14 +294,14 @@ fdc_acpi_getknownfds(struct fdc_acpi_softc *asc) { struct fdc_softc *sc = &asc->sc_fdc; ACPI_OBJECT *fdi, *e; - ACPI_BUFFER buf; + ACPI_BUFFER abuf; ACPI_STATUS rv; int i; for (i = 0; i < 4; i++) { if ((sc->sc_present & (1 << i)) == 0) continue; - rv = acpi_eval_struct(asc->sc_node->ad_handle, "_FDI", &buf); + rv = acpi_eval_struct(asc->sc_node->ad_handle, "_FDI", &abuf); if (ACPI_FAILURE(rv)) { #ifdef ACPI_FDC_DEBUG printf("%s: failed to evaluate _FDI: %s on drive %d\n", @@ -311,7 +311,7 @@ fdc_acpi_getknownfds(struct fdc_acpi_softc *asc) sc->sc_knownfds[i] = &fdc_acpi_fdtypes[0]; continue; } - fdi = (ACPI_OBJECT *)buf.Pointer; + fdi = (ACPI_OBJECT *)abuf.Pointer; if (fdi->Type != ACPI_TYPE_PACKAGE) { printf("%s: expected PACKAGE, got %d\n", sc->sc_dev.dv_xname, fdi->Type); @@ -326,7 +326,7 @@ fdc_acpi_getknownfds(struct fdc_acpi_softc *asc) sc->sc_present &= ~(1 << i); out: - AcpiOsFree(buf.Pointer); + AcpiOsFree(abuf.Pointer); } }