Deleted Added
full compact
acpi_button.c (96926) acpi_button.c (97274)
1/*-
2 * Copyright (c) 2000 Mitsaru IWASAKI <iwasaki@jp.freebsd.org>
3 * Copyright (c) 2000 Michael Smith <msmith@freebsd.org>
4 * Copyright (c) 2000 BSDi
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 2000 Mitsaru IWASAKI <iwasaki@jp.freebsd.org>
3 * Copyright (c) 2000 Michael Smith <msmith@freebsd.org>
4 * Copyright (c) 2000 BSDi
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/dev/acpica/acpi_button.c 96926 2002-05-19 06:16:47Z peter $
28 * $FreeBSD: head/sys/dev/acpica/acpi_button.c 97274 2002-05-25 11:18:03Z bde $
29 */
30
31#include "opt_acpi.h"
32#include <sys/param.h>
33#include <sys/kernel.h>
34#include <sys/bus.h>
35
36#include "acpi.h"

--- 91 unchanged lines hidden (view full) ---

128 sc = (struct acpi_button_softc *)arg;
129 acpi_sc = acpi_device_get_parent_softc(sc->button_dev);
130 if (acpi_sc == NULL) {
131 return_VOID;
132 }
133
134 switch (sc->button_type) {
135 case ACPI_POWER_BUTTON:
29 */
30
31#include "opt_acpi.h"
32#include <sys/param.h>
33#include <sys/kernel.h>
34#include <sys/bus.h>
35
36#include "acpi.h"

--- 91 unchanged lines hidden (view full) ---

128 sc = (struct acpi_button_softc *)arg;
129 acpi_sc = acpi_device_get_parent_softc(sc->button_dev);
130 if (acpi_sc == NULL) {
131 return_VOID;
132 }
133
134 switch (sc->button_type) {
135 case ACPI_POWER_BUTTON:
136 ACPI_VPRINT(sc->button_dev, acpi_sc,
137 "power button pressed\n", sc->button_type);
136 ACPI_VPRINT(sc->button_dev, acpi_sc, "power button pressed\n");
138 acpi_eventhandler_power_button_for_sleep((void *)acpi_sc);
139 break;
140 case ACPI_SLEEP_BUTTON:
137 acpi_eventhandler_power_button_for_sleep((void *)acpi_sc);
138 break;
139 case ACPI_SLEEP_BUTTON:
141 ACPI_VPRINT(sc->button_dev, acpi_sc,
142 "sleep button pressed\n", sc->button_type);
140 ACPI_VPRINT(sc->button_dev, acpi_sc, "sleep button pressed\n");
143 acpi_eventhandler_sleep_button_for_sleep((void *)acpi_sc);
144 break;
145 default:
146 break; /* unknown button type */
147 }
148 return_VOID;
149}
150

--- 8 unchanged lines hidden (view full) ---

159 sc = (struct acpi_button_softc *)arg;
160 acpi_sc = acpi_device_get_parent_softc(sc->button_dev);
161 if (acpi_sc == NULL) {
162 return_VOID;
163 }
164
165 switch (sc->button_type) {
166 case ACPI_POWER_BUTTON:
141 acpi_eventhandler_sleep_button_for_sleep((void *)acpi_sc);
142 break;
143 default:
144 break; /* unknown button type */
145 }
146 return_VOID;
147}
148

--- 8 unchanged lines hidden (view full) ---

157 sc = (struct acpi_button_softc *)arg;
158 acpi_sc = acpi_device_get_parent_softc(sc->button_dev);
159 if (acpi_sc == NULL) {
160 return_VOID;
161 }
162
163 switch (sc->button_type) {
164 case ACPI_POWER_BUTTON:
167 ACPI_VPRINT(sc->button_dev, acpi_sc,
168 "wakeup by power button\n", sc->button_type);
165 ACPI_VPRINT(sc->button_dev, acpi_sc, "wakeup by power button\n");
169 acpi_eventhandler_power_button_for_wakeup((void *)acpi_sc);
170 break;
171 case ACPI_SLEEP_BUTTON:
166 acpi_eventhandler_power_button_for_wakeup((void *)acpi_sc);
167 break;
168 case ACPI_SLEEP_BUTTON:
172 ACPI_VPRINT(sc->button_dev, acpi_sc,
173 "wakeup by sleep button\n", sc->button_type);
169 ACPI_VPRINT(sc->button_dev, acpi_sc, "wakeup by sleep button\n");
174 acpi_eventhandler_sleep_button_for_wakeup((void *)acpi_sc);
175 break;
176 default:
177 break; /* unknown button type */
178 }
179 return_VOID;
180}
181

--- 25 unchanged lines hidden ---
170 acpi_eventhandler_sleep_button_for_wakeup((void *)acpi_sc);
171 break;
172 default:
173 break; /* unknown button type */
174 }
175 return_VOID;
176}
177

--- 25 unchanged lines hidden ---