Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi No need to spread the ACPICA type system any mo...
details: https://anonhg.NetBSD.org/src/rev/2e6dd279c46f
branches: trunk
changeset: 753969:2e6dd279c46f
user: jruoho <jruoho%NetBSD.org@localhost>
date: Wed Apr 14 19:27:28 2010 +0000
description:
No need to spread the ACPICA type system any more than is necessary:
UINT8 -> uint8_t and UINT32 -> uint32_t.
diffstat:
sys/dev/acpi/acpi.c | 9 ++++---
sys/dev/acpi/acpi_bat.c | 8 +++---
sys/dev/acpi/acpi_ec.c | 24 +++++++++++-----------
sys/dev/acpi/acpi_lid.c | 6 ++--
sys/dev/acpi/acpi_pci_link.c | 8 +++---
sys/dev/acpi/acpi_tz.c | 48 ++++++++++++++++++++++----------------------
sys/dev/acpi/asus_acpi.c | 8 +++---
sys/dev/acpi/dalb_acpi.c | 8 +++---
sys/dev/acpi/fdc_acpi.c | 14 ++++++------
sys/dev/acpi/sony_acpi.c | 15 +++++++------
sys/dev/acpi/thinkpad_acpi.c | 8 +++---
sys/dev/acpi/vald_acpi.c | 44 ++++++++++++++++++++--------------------
sys/dev/acpi/valz_acpi.c | 13 ++++++-----
13 files changed, 108 insertions(+), 105 deletions(-)
diffs (truncated from 773 to 300 lines):
diff -r 407228e00895 -r 2e6dd279c46f sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c Wed Apr 14 18:55:12 2010 +0000
+++ b/sys/dev/acpi/acpi.c Wed Apr 14 19:27:28 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.172 2010/04/14 18:39:56 jruoho Exp $ */
+/* $NetBSD: acpi.c,v 1.173 2010/04/14 19:27:28 jruoho Exp $ */
/*-
* Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.172 2010/04/14 18:39:56 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.173 2010/04/14 19:27:28 jruoho Exp $");
#include "opt_acpi.h"
#include "opt_pcifixup.h"
@@ -784,13 +784,14 @@
resc = ACPI_NEXT_RESOURCE(resc);
resn = ACPI_NEXT_RESOURCE(resn);
resp = ACPI_NEXT_RESOURCE(resp);
- delta = (UINT8 *)resn - (UINT8 *)bufn.Pointer;
+ delta = (uint8_t *)resn - (uint8_t *)bufn.Pointer;
if (delta >=
bufn.Length-ACPI_RS_SIZE(ACPI_RESOURCE_DATA)) {
bufn.Length *= 2;
bufn.Pointer = realloc(bufn.Pointer, bufn.Length,
M_ACPI, M_WAITOK);
- resn = (ACPI_RESOURCE *)((UINT8 *)bufn.Pointer + delta);
+ resn = (ACPI_RESOURCE *)((uint8_t *)bufn.Pointer +
+ delta);
}
}
diff -r 407228e00895 -r 2e6dd279c46f sys/dev/acpi/acpi_bat.c
--- a/sys/dev/acpi/acpi_bat.c Wed Apr 14 18:55:12 2010 +0000
+++ b/sys/dev/acpi/acpi_bat.c Wed Apr 14 19:27:28 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_bat.c,v 1.98 2010/04/03 16:29:22 jruoho Exp $ */
+/* $NetBSD: acpi_bat.c,v 1.99 2010/04/14 19:27:28 jruoho Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.98 2010/04/03 16:29:22 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.99 2010/04/14 19:27:28 jruoho Exp $");
#include <sys/param.h>
#include <sys/condvar.h>
@@ -182,7 +182,7 @@
static void acpibat_update_info(void *);
static void acpibat_update_status(void *);
static void acpibat_init_envsys(device_t);
-static void acpibat_notify_handler(ACPI_HANDLE, UINT32, void *);
+static void acpibat_notify_handler(ACPI_HANDLE, uint32_t, void *);
static void acpibat_refresh(struct sysmon_envsys *, envsys_data_t *);
static bool acpibat_resume(device_t, const pmf_qual_t *);
static void acpibat_get_limits(struct sysmon_envsys *, envsys_data_t *,
@@ -652,7 +652,7 @@
* Callback from ACPI interrupt handler to notify us of an event.
*/
static void
-acpibat_notify_handler(ACPI_HANDLE handle, UINT32 notify, void *context)
+acpibat_notify_handler(ACPI_HANDLE handle, uint32_t notify, void *context)
{
static const int handler = OSL_NOTIFY_HANDLER;
device_t dv = context;
diff -r 407228e00895 -r 2e6dd279c46f sys/dev/acpi/acpi_ec.c
--- a/sys/dev/acpi/acpi_ec.c Wed Apr 14 18:55:12 2010 +0000
+++ b/sys/dev/acpi/acpi_ec.c Wed Apr 14 19:27:28 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_ec.c,v 1.64 2010/03/29 16:35:59 dyoung Exp $ */
+/* $NetBSD: acpi_ec.c,v 1.65 2010/04/14 19:27:28 jruoho Exp $ */
/*-
* Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.64 2010/03/29 16:35:59 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.65 2010/04/14 19:27:28 jruoho Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@@ -122,7 +122,7 @@
ACPI_HANDLE sc_ech;
ACPI_HANDLE sc_gpeh;
- UINT8 sc_gpebit;
+ uint8_t sc_gpebit;
bus_space_tag_t sc_data_st;
bus_space_handle_t sc_data_sh;
@@ -131,7 +131,7 @@
bus_space_handle_t sc_csr_sh;
bool sc_need_global_lock;
- UINT32 sc_global_lock;
+ uint32_t sc_global_lock;
kmutex_t sc_mtx, sc_access_mtx;
kcondvar_t sc_cv, sc_cv_sci;
@@ -161,10 +161,10 @@
static void acpiec_callout(void *);
static void acpiec_gpe_query(void *);
-static UINT32 acpiec_gpe_handler(void *);
-static ACPI_STATUS acpiec_space_setup(ACPI_HANDLE, UINT32, void *, void **);
-static ACPI_STATUS acpiec_space_handler(UINT32, ACPI_PHYSICAL_ADDRESS,
- UINT32, ACPI_INTEGER *, void *, void *);
+static uint32_t acpiec_gpe_handler(void *);
+static ACPI_STATUS acpiec_space_setup(ACPI_HANDLE, uint32_t, void *, void **);
+static ACPI_STATUS acpiec_space_handler(uint32_t, ACPI_PHYSICAL_ADDRESS,
+ uint32_t, ACPI_INTEGER *, void *, void *);
static void acpiec_gpe_state_machine(device_t);
@@ -511,7 +511,7 @@
}
static ACPI_STATUS
-acpiec_space_setup(ACPI_HANDLE region, UINT32 func, void *arg,
+acpiec_space_setup(ACPI_HANDLE region, uint32_t func, void *arg,
void **region_arg)
{
if (func == ACPI_REGION_DEACTIVATE)
@@ -652,8 +652,8 @@
}
static ACPI_STATUS
-acpiec_space_handler(UINT32 func, ACPI_PHYSICAL_ADDRESS paddr,
- UINT32 width, ACPI_INTEGER *value, void *arg, void *region_arg)
+acpiec_space_handler(uint32_t func, ACPI_PHYSICAL_ADDRESS paddr,
+ uint32_t width, ACPI_INTEGER *value, void *arg, void *region_arg)
{
device_t dv;
struct acpiec_softc *sc;
@@ -856,7 +856,7 @@
mutex_exit(&sc->sc_mtx);
}
-static UINT32
+static uint32_t
acpiec_gpe_handler(void *arg)
{
device_t dv = arg;
diff -r 407228e00895 -r 2e6dd279c46f sys/dev/acpi/acpi_lid.c
--- a/sys/dev/acpi/acpi_lid.c Wed Apr 14 18:55:12 2010 +0000
+++ b/sys/dev/acpi/acpi_lid.c Wed Apr 14 19:27:28 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_lid.c,v 1.37 2010/03/05 21:01:44 jruoho Exp $ */
+/* $NetBSD: acpi_lid.c,v 1.38 2010/04/14 19:27:28 jruoho Exp $ */
/*
* Copyright 2001, 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_lid.c,v 1.37 2010/03/05 21:01:44 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_lid.c,v 1.38 2010/04/14 19:27:28 jruoho Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -68,7 +68,7 @@
static void acpilid_attach(device_t, device_t, void *);
static int acpilid_detach(device_t, int);
static void acpilid_status_changed(void *);
-static void acpilid_notify_handler(ACPI_HANDLE, UINT32, void *);
+static void acpilid_notify_handler(ACPI_HANDLE, uint32_t, void *);
CFATTACH_DECL_NEW(acpilid, sizeof(struct acpilid_softc),
acpilid_match, acpilid_attach, acpilid_detach, NULL);
diff -r 407228e00895 -r 2e6dd279c46f sys/dev/acpi/acpi_pci_link.c
--- a/sys/dev/acpi/acpi_pci_link.c Wed Apr 14 18:55:12 2010 +0000
+++ b/sys/dev/acpi/acpi_pci_link.c Wed Apr 14 19:27:28 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_pci_link.c,v 1.16 2010/03/05 14:00:17 jruoho Exp $ */
+/* $NetBSD: acpi_pci_link.c,v 1.17 2010/04/14 19:27:28 jruoho Exp $ */
/*-
* Copyright (c) 2002 Mitsuru IWASAKI <iwasaki%jp.freebsd.org@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_pci_link.c,v 1.16 2010/03/05 14:00:17 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pci_link.c,v 1.17 2010/04/14 19:27:28 jruoho Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -258,8 +258,8 @@
{
struct link_res_request *req;
struct link *link;
- UINT8 *irqs = NULL;
- UINT32 *ext_irqs = NULL;
+ uint8_t *irqs = NULL;
+ uint32_t *ext_irqs = NULL;
int i, is_ext_irq = 1;
req = (struct link_res_request *)context;
diff -r 407228e00895 -r 2e6dd279c46f sys/dev/acpi/acpi_tz.c
--- a/sys/dev/acpi/acpi_tz.c Wed Apr 14 18:55:12 2010 +0000
+++ b/sys/dev/acpi/acpi_tz.c Wed Apr 14 19:27:28 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.63 2010/03/17 20:29:32 jruoho Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.64 2010/04/14 19:27:28 jruoho Exp $ */
/*
* Copyright (c) 2003 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.63 2010/03/17 20:29:32 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.64 2010/04/14 19:27:28 jruoho Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -78,33 +78,33 @@
struct acpitz_zone {
/* Active cooling temperature threshold */
- UINT32 ac[ATZ_NLEVELS];
+ uint32_t ac[ATZ_NLEVELS];
/* Package of references to all active cooling devices for a level */
ACPI_BUFFER al[ATZ_NLEVELS];
/* Critical temperature threshold for system shutdown */
- UINT32 crt;
+ uint32_t crt;
/* Critical temperature threshold for S4 sleep */
- UINT32 hot;
+ uint32_t hot;
/* Package of references to processor objects for passive cooling */
ACPI_BUFFER psl;
/* Conveys if temperatures are absolute or relative values. */
- UINT32 rtv;
+ uint32_t rtv;
/* Passive cooling temperature threshold */
- UINT32 psv;
+ uint32_t psv;
/* Thermal constants for use in passive cooling formulas */
- UINT32 tc1, tc2;
+ uint32_t tc1, tc2;
/* Current temperature of the thermal zone */
- UINT32 prevtmp, tmp;
+ uint32_t prevtmp, tmp;
/* Thermal sampling period for passive cooling, in tenths of seconds */
- UINT32 tsp;
+ uint32_t tsp;
/* Package of references to devices in this TZ (optional) */
ACPI_BUFFER tzd;
/* Recommended TZ polling frequency, in tenths of seconds */
- UINT32 tzp;
+ uint32_t tzp;
/* Thermal zone name */
char *name;
/* FAN min, max, current rpms */
- UINT32 fanmin, fanmax, fancurrent;
+ uint32_t fanmin, fanmax, fancurrent;
};
struct acpitz_softc {
@@ -130,19 +130,20 @@
static void acpitz_print_status(device_t);
static void acpitz_power_off(struct acpitz_softc *);
static void acpitz_power_zone(struct acpitz_softc *, int, int);
-static void acpitz_sane_temp(UINT32 *tmp);
+static void acpitz_sane_temp(uint32_t *tmp);
static ACPI_STATUS
acpitz_switch_cooler(ACPI_OBJECT *, void *);
-static void acpitz_notify_handler(ACPI_HANDLE, UINT32, void *);
-static int acpitz_get_integer(device_t, const char *, UINT32 *);
+static void acpitz_notify_handler(ACPI_HANDLE, uint32_t, void *);
+static int acpitz_get_integer(device_t, const char *, uint32_t *);
static void acpitz_tick(void *);
static void acpitz_init_envsys(device_t);
static void acpitz_get_limits(struct sysmon_envsys *, envsys_data_t *,
sysmon_envsys_lim_t *, uint32_t *);
-static int acpitz_get_fanspeed(device_t, UINT32 *, UINT32 *, UINT32 *);
+static int acpitz_get_fanspeed(device_t, uint32_t *,
+ uint32_t *, uint32_t *);
#ifdef notyet
static ACPI_STATUS
- acpitz_set_fanspeed(device_t, UINT32);
+ acpitz_set_fanspeed(device_t, uint32_t);
#endif
CFATTACH_DECL_NEW(acpitz, sizeof(struct acpitz_softc), acpitz_match,
@@ -238,9 +239,8 @@
{
device_t dv = opaque;
struct acpitz_softc *sc = device_private(dv);
- UINT32 tmp, active;
Home |
Main Index |
Thread Index |
Old Index