Deleted Added
full compact
acpi_acad.c (70340) acpi_acad.c (71872)
1/*-
2 * Copyright (c) 2000 Takanori Watanabe
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2000 Takanori Watanabe
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/acpica/acpi_acad.c 70340 2000-12-24 19:12:10Z iwasaki $
26 * $FreeBSD: head/sys/dev/acpica/acpi_acad.c 71872 2001-01-31 09:30:57Z msmith $
27 */
28
29#include "opt_acpi.h"
30#include <sys/param.h>
31#include <sys/kernel.h>
32#include <sys/bus.h>
33
34#include <machine/bus.h>

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

59
60static void
61acpi_acad_get_status(void *context)
62{
63 device_t dev = context;
64 struct acpi_acad_softc *sc = device_get_softc(dev);
65 ACPI_HANDLE h = acpi_get_handle(dev);
66
27 */
28
29#include "opt_acpi.h"
30#include <sys/param.h>
31#include <sys/kernel.h>
32#include <sys/bus.h>
33
34#include <machine/bus.h>

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

59
60static void
61acpi_acad_get_status(void *context)
62{
63 device_t dev = context;
64 struct acpi_acad_softc *sc = device_get_softc(dev);
65 ACPI_HANDLE h = acpi_get_handle(dev);
66
67 if (acpi_EvaluateNumber(h, "_PSR", &sc->status) != AE_OK)
67 if (acpi_EvaluateInteger(h, "_PSR", &sc->status) != AE_OK)
68 return;
69 device_printf(dev,"%s\n",(sc->status) ? "On Line" : "Off Line");
70}
71
72static void
73acpi_acad_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context)
74{
75 device_t dev = context;

--- 90 unchanged lines hidden ---
68 return;
69 device_printf(dev,"%s\n",(sc->status) ? "On Line" : "Off Line");
70}
71
72static void
73acpi_acad_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context)
74{
75 device_t dev = context;

--- 90 unchanged lines hidden ---