Fix prototypes; SYSCTLFN_ARGS -> SYSCTLFN_PROTO. (These things really only obscure the code.)diff -r1.208 -r1.209 src/sys/dev/acpi/acpi.c
(jruoho)
--- src/sys/dev/acpi/acpi.c 2010/07/25 12:54:46 1.208
+++ src/sys/dev/acpi/acpi.c 2010/08/06 18:10:40 1.209
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: acpi.c,v 1.208 2010/07/25 12:54:46 pgoyette Exp $ */ | 1 | /* $NetBSD: acpi.c,v 1.209 2010/08/06 18:10:40 jruoho Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Charles M. Hannum of By Noon Software, Inc. | 8 | * by Charles M. Hannum of By Noon Software, Inc. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -55,27 +55,27 @@ | @@ -55,27 +55,27 @@ | |||
55 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 55 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
56 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 56 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
57 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC | 57 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC | |
58 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 58 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
59 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 59 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
60 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 60 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
61 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 61 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
62 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 62 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
63 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 63 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
64 | * POSSIBILITY OF SUCH DAMAGE. | 64 | * POSSIBILITY OF SUCH DAMAGE. | |
65 | */ | 65 | */ | |
66 | 66 | |||
67 | #include <sys/cdefs.h> | 67 | #include <sys/cdefs.h> | |
68 | __KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.208 2010/07/25 12:54:46 pgoyette Exp $"); | 68 | __KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.209 2010/08/06 18:10:40 jruoho Exp $"); | |
69 | 69 | |||
70 | #include "opt_acpi.h" | 70 | #include "opt_acpi.h" | |
71 | #include "opt_pcifixup.h" | 71 | #include "opt_pcifixup.h" | |
72 | 72 | |||
73 | #include <sys/param.h> | 73 | #include <sys/param.h> | |
74 | #include <sys/device.h> | 74 | #include <sys/device.h> | |
75 | #include <sys/kernel.h> | 75 | #include <sys/kernel.h> | |
76 | #include <sys/malloc.h> | 76 | #include <sys/malloc.h> | |
77 | #include <sys/module.h> | 77 | #include <sys/module.h> | |
78 | #include <sys/mutex.h> | 78 | #include <sys/mutex.h> | |
79 | #include <sys/sysctl.h> | 79 | #include <sys/sysctl.h> | |
80 | #include <sys/systm.h> | 80 | #include <sys/systm.h> | |
81 | #include <sys/timetc.h> | 81 | #include <sys/timetc.h> | |
@@ -179,29 +179,29 @@ static int acpi_rescan(device_t, const | @@ -179,29 +179,29 @@ static int acpi_rescan(device_t, const | |||
179 | static void acpi_rescan_nodes(struct acpi_softc *); | 179 | static void acpi_rescan_nodes(struct acpi_softc *); | |
180 | static void acpi_rescan_capabilities(struct acpi_softc *); | 180 | static void acpi_rescan_capabilities(struct acpi_softc *); | |
181 | static int acpi_print(void *aux, const char *); | 181 | static int acpi_print(void *aux, const char *); | |
182 | 182 | |||
183 | static void acpi_notify_handler(ACPI_HANDLE, uint32_t, void *); | 183 | static void acpi_notify_handler(ACPI_HANDLE, uint32_t, void *); | |
184 | 184 | |||
185 | static void acpi_register_fixed_button(struct acpi_softc *, int); | 185 | static void acpi_register_fixed_button(struct acpi_softc *, int); | |
186 | static void acpi_deregister_fixed_button(struct acpi_softc *, int); | 186 | static void acpi_deregister_fixed_button(struct acpi_softc *, int); | |
187 | static uint32_t acpi_fixed_button_handler(void *); | 187 | static uint32_t acpi_fixed_button_handler(void *); | |
188 | static void acpi_fixed_button_pressed(void *); | 188 | static void acpi_fixed_button_pressed(void *); | |
189 | 189 | |||
190 | static void acpi_sleep_init(struct acpi_softc *); | 190 | static void acpi_sleep_init(struct acpi_softc *); | |
191 | 191 | |||
192 | static int sysctl_hw_acpi_fixedstats(SYSCTLFN_ARGS); | 192 | static int sysctl_hw_acpi_fixedstats(SYSCTLFN_PROTO); | |
193 | static int sysctl_hw_acpi_sleepstate(SYSCTLFN_ARGS); | 193 | static int sysctl_hw_acpi_sleepstate(SYSCTLFN_PROTO); | |
194 | static int sysctl_hw_acpi_sleepstates(SYSCTLFN_ARGS); | 194 | static int sysctl_hw_acpi_sleepstates(SYSCTLFN_PROTO); | |
195 | 195 | |||
196 | static bool acpi_is_scope(struct acpi_devnode *); | 196 | static bool acpi_is_scope(struct acpi_devnode *); | |
197 | static ACPI_TABLE_HEADER *acpi_map_rsdt(void); | 197 | static ACPI_TABLE_HEADER *acpi_map_rsdt(void); | |
198 | static void acpi_unmap_rsdt(ACPI_TABLE_HEADER *); | 198 | static void acpi_unmap_rsdt(ACPI_TABLE_HEADER *); | |
199 | 199 | |||
200 | extern struct cfdriver acpi_cd; | 200 | extern struct cfdriver acpi_cd; | |
201 | 201 | |||
202 | /* Handle routine vectors and loading for acpiverbose module */ | 202 | /* Handle routine vectors and loading for acpiverbose module */ | |
203 | void acpi_null(void); | 203 | void acpi_null(void); | |
204 | 204 | |||
205 | void acpi_print_devnodes_stub(struct acpi_softc *); | 205 | void acpi_print_devnodes_stub(struct acpi_softc *); | |
206 | void acpi_print_tree_stub(struct acpi_devnode *, uint32_t); | 206 | void acpi_print_tree_stub(struct acpi_devnode *, uint32_t); | |
207 | void acpi_print_dev_stub(const char *); | 207 | void acpi_print_dev_stub(const char *); |
--- src/sys/dev/acpi/acpi_power.c 2010/07/01 09:28:37 1.21
+++ src/sys/dev/acpi/acpi_power.c 2010/08/06 18:10:40 1.22
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: acpi_power.c,v 1.21 2010/07/01 09:28:37 jruoho Exp $ */ | 1 | /* $NetBSD: acpi_power.c,v 1.22 2010/08/06 18:10:40 jruoho Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Jukka Ruohonen. | 8 | * by Jukka Ruohonen. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -46,27 +46,27 @@ | @@ -46,27 +46,27 @@ | |||
46 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 46 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
47 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 47 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
48 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 48 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
49 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 49 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
50 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 50 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
51 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 51 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
52 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 52 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
54 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 54 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
55 | * SUCH DAMAGE. | 55 | * SUCH DAMAGE. | |
56 | */ | 56 | */ | |
57 | 57 | |||
58 | #include <sys/cdefs.h> | 58 | #include <sys/cdefs.h> | |
59 | __KERNEL_RCSID(0, "$NetBSD: acpi_power.c,v 1.21 2010/07/01 09:28:37 jruoho Exp $"); | 59 | __KERNEL_RCSID(0, "$NetBSD: acpi_power.c,v 1.22 2010/08/06 18:10:40 jruoho Exp $"); | |
60 | 60 | |||
61 | #include <sys/param.h> | 61 | #include <sys/param.h> | |
62 | #include <sys/kmem.h> | 62 | #include <sys/kmem.h> | |
63 | #include <sys/mutex.h> | 63 | #include <sys/mutex.h> | |
64 | #include <sys/sysctl.h> | 64 | #include <sys/sysctl.h> | |
65 | 65 | |||
66 | #include <dev/acpi/acpireg.h> | 66 | #include <dev/acpi/acpireg.h> | |
67 | #include <dev/acpi/acpivar.h> | 67 | #include <dev/acpi/acpivar.h> | |
68 | #include <dev/acpi/acpi_power.h> | 68 | #include <dev/acpi/acpi_power.h> | |
69 | 69 | |||
70 | #define _COMPONENT ACPI_BUS_COMPONENT | 70 | #define _COMPONENT ACPI_BUS_COMPONENT | |
71 | ACPI_MODULE_NAME ("acpi_power") | 71 | ACPI_MODULE_NAME ("acpi_power") | |
72 | 72 | |||
@@ -105,27 +105,27 @@ static struct acpi_power_res *acpi_power | @@ -105,27 +105,27 @@ static struct acpi_power_res *acpi_power | |||
105 | static struct acpi_power_res *acpi_power_res_get(ACPI_HANDLE); | 105 | static struct acpi_power_res *acpi_power_res_get(ACPI_HANDLE); | |
106 | 106 | |||
107 | static ACPI_STATUS acpi_power_get_direct(struct acpi_devnode *); | 107 | static ACPI_STATUS acpi_power_get_direct(struct acpi_devnode *); | |
108 | static ACPI_STATUS acpi_power_get_indirect(struct acpi_devnode *); | 108 | static ACPI_STATUS acpi_power_get_indirect(struct acpi_devnode *); | |
109 | static ACPI_STATUS acpi_power_switch(struct acpi_devnode *, | 109 | static ACPI_STATUS acpi_power_switch(struct acpi_devnode *, | |
110 | int, bool); | 110 | int, bool); | |
111 | static ACPI_STATUS acpi_power_res_ref(struct acpi_power_res *, | 111 | static ACPI_STATUS acpi_power_res_ref(struct acpi_power_res *, | |
112 | ACPI_HANDLE); | 112 | ACPI_HANDLE); | |
113 | static ACPI_STATUS acpi_power_res_deref(struct acpi_power_res *, | 113 | static ACPI_STATUS acpi_power_res_deref(struct acpi_power_res *, | |
114 | ACPI_HANDLE); | 114 | ACPI_HANDLE); | |
115 | static ACPI_STATUS acpi_power_res_sta(ACPI_OBJECT *, void *); | 115 | static ACPI_STATUS acpi_power_res_sta(ACPI_OBJECT *, void *); | |
116 | 116 | |||
117 | static ACPI_OBJECT *acpi_power_pkg_get(ACPI_HANDLE, int); | 117 | static ACPI_OBJECT *acpi_power_pkg_get(ACPI_HANDLE, int); | |
118 | static int acpi_power_sysctl(SYSCTLFN_ARGS); | 118 | static int acpi_power_sysctl(SYSCTLFN_PROTO); | |
119 | static const char *acpi_xname(ACPI_HANDLE); | 119 | static const char *acpi_xname(ACPI_HANDLE); | |
120 | 120 | |||
121 | static struct acpi_power_res * | 121 | static struct acpi_power_res * | |
122 | acpi_power_res_init(ACPI_HANDLE hdl) | 122 | acpi_power_res_init(ACPI_HANDLE hdl) | |
123 | { | 123 | { | |
124 | struct acpi_power_res *tmp = NULL; | 124 | struct acpi_power_res *tmp = NULL; | |
125 | struct acpi_power_res *res = NULL; | 125 | struct acpi_power_res *res = NULL; | |
126 | ACPI_OBJECT *obj; | 126 | ACPI_OBJECT *obj; | |
127 | ACPI_BUFFER buf; | 127 | ACPI_BUFFER buf; | |
128 | ACPI_STATUS rv; | 128 | ACPI_STATUS rv; | |
129 | 129 | |||
130 | rv = acpi_eval_struct(hdl, NULL, &buf); | 130 | rv = acpi_eval_struct(hdl, NULL, &buf); | |
131 | 131 |