Deleted Added
full compact
acpi_powerres.c (126517) acpi_powerres.c (126560)
1/*-
2 * Copyright (c) 2001 Michael Smith
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

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

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
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Michael Smith
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

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

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
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_powerres.c 126517 2004-03-03 03:02:17Z njl $");
28__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_powerres.c 126560 2004-03-03 18:34:42Z njl $");
29
30#include "opt_acpi.h"
31#include <sys/param.h>
32#include <sys/kernel.h>
33#include <sys/malloc.h>
34#include <sys/bus.h>
35
36#include "acpi.h"

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

567 if (TAILQ_FIRST(&rp->ap_references) == NULL) {
568 ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS,
569 "%s has no references, not turning on\n",
570 acpi_name(rp->ap_resource)));
571 continue;
572 }
573
574 /* We could cache this if we trusted it not to change under us */
29
30#include "opt_acpi.h"
31#include <sys/param.h>
32#include <sys/kernel.h>
33#include <sys/malloc.h>
34#include <sys/bus.h>
35
36#include "acpi.h"

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

567 if (TAILQ_FIRST(&rp->ap_references) == NULL) {
568 ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS,
569 "%s has no references, not turning on\n",
570 acpi_name(rp->ap_resource)));
571 continue;
572 }
573
574 /* We could cache this if we trusted it not to change under us */
575 status = acpi_EvaluateInteger(rp->ap_resource, "_STA", &cur);
575 status = acpi_GetInteger(rp->ap_resource, "_STA", &cur);
576 if (ACPI_FAILURE(status)) {
577 ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "can't get status of %s - %d\n",
578 acpi_name(rp->ap_resource), status));
579
580 /* XXX is this correct? Always switch if in doubt? */
581 continue;
582 }
583

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

610 if (TAILQ_FIRST(&rp->ap_references) != NULL) {
611 ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS,
612 "%s has references, not turning off\n",
613 acpi_name(rp->ap_resource)));
614 continue;
615 }
616
617 /* We could cache this if we trusted it not to change under us */
576 if (ACPI_FAILURE(status)) {
577 ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "can't get status of %s - %d\n",
578 acpi_name(rp->ap_resource), status));
579
580 /* XXX is this correct? Always switch if in doubt? */
581 continue;
582 }
583

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

610 if (TAILQ_FIRST(&rp->ap_references) != NULL) {
611 ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS,
612 "%s has references, not turning off\n",
613 acpi_name(rp->ap_resource)));
614 continue;
615 }
616
617 /* We could cache this if we trusted it not to change under us */
618 status = acpi_EvaluateInteger(rp->ap_resource, "_STA", &cur);
618 status = acpi_GetInteger(rp->ap_resource, "_STA", &cur);
619 if (ACPI_FAILURE(status)) {
620 ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "can't get status of %s - %d\n",
621 acpi_name(rp->ap_resource), status));
622 /* XXX is this correct? Always switch if in doubt? */
623 continue;
624 }
625
626 /*

--- 59 unchanged lines hidden ---
619 if (ACPI_FAILURE(status)) {
620 ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "can't get status of %s - %d\n",
621 acpi_name(rp->ap_resource), status));
622 /* XXX is this correct? Always switch if in doubt? */
623 continue;
624 }
625
626 /*

--- 59 unchanged lines hidden ---