Deleted Added
full compact
acpi_powerres.c (128248) acpi_powerres.c (128252)
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 128248 2004-04-14 17:47:42Z njl $");
28__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_powerres.c 128252 2004-04-14 17:58:19Z 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"

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

303 ACPI_BUFFER reslist_buffer;
304 ACPI_OBJECT *reslist_object;
305 ACPI_STATUS status;
306 char *method_name, *reslist_name;
307 int res_changed;
308
309 ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
310
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"

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

303 ACPI_BUFFER reslist_buffer;
304 ACPI_OBJECT *reslist_object;
305 ACPI_STATUS status;
306 char *method_name, *reslist_name;
307 int res_changed;
308
309 ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
310
311 /* It's never ok to switch a non-existent consumer. */
312 if (consumer == NULL)
313 return_ACPI_STATUS (AE_NOT_FOUND);
314
311 /* Find the consumer */
312 if ((pc = acpi_pwr_find_consumer(consumer)) == NULL) {
313 if (ACPI_FAILURE(status = acpi_pwr_register_consumer(consumer)))
314 return_ACPI_STATUS (status);
315 if ((pc = acpi_pwr_find_consumer(consumer)) == NULL) {
316 return_ACPI_STATUS (AE_ERROR); /* something very wrong */
317 }
318 }

--- 355 unchanged lines hidden ---
315 /* Find the consumer */
316 if ((pc = acpi_pwr_find_consumer(consumer)) == NULL) {
317 if (ACPI_FAILURE(status = acpi_pwr_register_consumer(consumer)))
318 return_ACPI_STATUS (status);
319 if ((pc = acpi_pwr_find_consumer(consumer)) == NULL) {
320 return_ACPI_STATUS (AE_ERROR); /* something very wrong */
321 }
322 }

--- 355 unchanged lines hidden ---