Deleted Added
full compact
acpi_cmbat.c (136369) acpi_cmbat.c (138300)
1/*-
2 * Copyright (c) 2000 Munehiro Matsuda
3 * Copyright (c) 2000 Takanori Watanabe
4 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
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 Munehiro Matsuda
3 * Copyright (c) 2000 Takanori Watanabe
4 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
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_cmbat.c 136369 2004-10-11 06:18:07Z njl $
28 * $FreeBSD: head/sys/dev/acpica/acpi_cmbat.c 138300 2004-12-02 00:25:35Z marks $
29 */
30
31#include "opt_acpi.h"
32#include <sys/param.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/bus.h>
36#include <sys/ioccom.h>

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

582 int retry;
583 device_t dev;
584
585 dev = (device_t)arg;
586 sc = device_get_softc(dev);
587 ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev),
588 "battery initialization start\n");
589
29 */
30
31#include "opt_acpi.h"
32#include <sys/param.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/bus.h>
36#include <sys/ioccom.h>

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

582 int retry;
583 device_t dev;
584
585 dev = (device_t)arg;
586 sc = device_get_softc(dev);
587 ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev),
588 "battery initialization start\n");
589
590 for (retry = 0; retry < ACPI_CMBAT_RETRY_MAX; retry++, AcpiOsSleep(10, 0)) {
590 for (retry = 0; retry < ACPI_CMBAT_RETRY_MAX; retry++, AcpiOsSleep(10000)) {
591 sc->present = acpi_BatteryIsPresent(dev);
592 if (!sc->present)
593 continue;
594
595 ACPI_SERIAL_BEGIN(cmbat);
596 timespecclear(&sc->bst_lastupdated);
597 timespecclear(&sc->bif_lastupdated);
598 acpi_cmbat_get_bst(dev);

--- 52 unchanged lines hidden ---
591 sc->present = acpi_BatteryIsPresent(dev);
592 if (!sc->present)
593 continue;
594
595 ACPI_SERIAL_BEGIN(cmbat);
596 timespecclear(&sc->bst_lastupdated);
597 timespecclear(&sc->bif_lastupdated);
598 acpi_cmbat_get_bst(dev);

--- 52 unchanged lines hidden ---