acpi_cmbat.c (70340) | acpi_cmbat.c (71872) |
---|---|
1/*- 2 * Copyright (c) 2000 Takanori Watanabe 3 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/*- 2 * Copyright (c) 2000 Takanori Watanabe 3 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sys/dev/acpica/acpi_cmbat.c 70340 2000-12-24 19:12:10Z iwasaki $ | 27 * $FreeBSD: head/sys/dev/acpica/acpi_cmbat.c 71872 2001-01-31 09:30:57Z msmith $ |
28 */ 29 30#include "opt_acpi.h" 31#include <sys/param.h> 32#include <sys/kernel.h> 33#include <sys/bus.h> 34#include <sys/ioccom.h> 35#include <sys/conf.h> --- 26 unchanged lines hidden (view full) --- 62/* XXX: devclass_get_maxunit() don't give us the current allocated units... */ 63static int acpi_cmbat_units = 0; 64 65#define ACPI_BATTERY_BST_CHANGE 0x80 66#define ACPI_BATTERY_BIF_CHANGE 0x81 67 68#define PKG_GETINT(res, tmp, idx, dest, label) do { \ 69 tmp = &res->Package.Elements[idx]; \ | 28 */ 29 30#include "opt_acpi.h" 31#include <sys/param.h> 32#include <sys/kernel.h> 33#include <sys/bus.h> 34#include <sys/ioccom.h> 35#include <sys/conf.h> --- 26 unchanged lines hidden (view full) --- 62/* XXX: devclass_get_maxunit() don't give us the current allocated units... */ 63static int acpi_cmbat_units = 0; 64 65#define ACPI_BATTERY_BST_CHANGE 0x80 66#define ACPI_BATTERY_BIF_CHANGE 0x81 67 68#define PKG_GETINT(res, tmp, idx, dest, label) do { \ 69 tmp = &res->Package.Elements[idx]; \ |
70 if (tmp->Type != ACPI_TYPE_NUMBER) \ | 70 if (tmp->Type != ACPI_TYPE_INTEGER) \ |
71 goto label ; \ | 71 goto label ; \ |
72 dest = tmp->Number.Value; \ | 72 dest = tmp->Integer.Value; \ |
73} while(0) 74 75#define PKG_GETSTR(res, tmp, idx, dest, size, label) do { \ 76 size_t length; \ 77 length = size; \ 78 tmp = &res->Package.Elements[idx]; \ 79 bzero(dest, sizeof(dest)); \ 80 switch (tmp->Type) { \ --- 279 unchanged lines hidden --- | 73} while(0) 74 75#define PKG_GETSTR(res, tmp, idx, dest, size, label) do { \ 76 size_t length; \ 77 length = size; \ 78 tmp = &res->Package.Elements[idx]; \ 79 bzero(dest, sizeof(dest)); \ 80 switch (tmp->Type) { \ --- 279 unchanged lines hidden --- |