Style cleanups. "extern" is unneeded for function prototypes.

This commit is contained in:
Nate Lawson 2004-05-28 07:15:55 +00:00
parent cc85c78ce3
commit 54af2f27c7

View File

@ -89,10 +89,10 @@ struct acpi_device {
}; };
struct acpi_prw_data { struct acpi_prw_data {
ACPI_HANDLE gpe_handle; ACPI_HANDLE gpe_handle;
int gpe_bit; int gpe_bit;
int lowest_wake; int lowest_wake;
void *power_res; void *power_res;
}; };
/* Flags for each device defined in the AML namespace. */ /* Flags for each device defined in the AML namespace. */
@ -188,7 +188,7 @@ acpi_get_type(device_t dev)
} }
#ifdef ACPI_DEBUGGER #ifdef ACPI_DEBUGGER
extern void acpi_EnterDebugger(void); void acpi_EnterDebugger(void);
#endif #endif
#ifdef ACPI_DEBUG #ifdef ACPI_DEBUG
@ -204,72 +204,69 @@ extern void acpi_EnterDebugger(void);
} while (0) } while (0)
#define ACPI_DEVINFO_PRESENT(x) (((x) & 0x9) == 9) #define ACPI_DEVINFO_PRESENT(x) (((x) & 0x9) == 9)
extern BOOLEAN acpi_DeviceIsPresent(device_t dev); BOOLEAN acpi_DeviceIsPresent(device_t dev);
extern BOOLEAN acpi_BatteryIsPresent(device_t dev); BOOLEAN acpi_BatteryIsPresent(device_t dev);
extern BOOLEAN acpi_MatchHid(device_t dev, char *hid); BOOLEAN acpi_MatchHid(device_t dev, char *hid);
extern ACPI_STATUS acpi_GetHandleInScope(ACPI_HANDLE parent, char *path, ACPI_STATUS acpi_GetHandleInScope(ACPI_HANDLE parent, char *path,
ACPI_HANDLE *result); ACPI_HANDLE *result);
extern uint32_t acpi_TimerDelta(uint32_t end, uint32_t start); uint32_t acpi_TimerDelta(uint32_t end, uint32_t start);
extern ACPI_BUFFER *acpi_AllocBuffer(int size); ACPI_BUFFER *acpi_AllocBuffer(int size);
extern ACPI_STATUS acpi_ConvertBufferToInteger(ACPI_BUFFER *bufp, ACPI_STATUS acpi_ConvertBufferToInteger(ACPI_BUFFER *bufp,
UINT32 *number); UINT32 *number);
extern ACPI_STATUS acpi_GetInteger(ACPI_HANDLE handle, char *path, ACPI_STATUS acpi_GetInteger(ACPI_HANDLE handle, char *path,
UINT32 *number); UINT32 *number);
extern ACPI_STATUS acpi_SetInteger(ACPI_HANDLE handle, char *path, ACPI_STATUS acpi_SetInteger(ACPI_HANDLE handle, char *path,
UINT32 number); UINT32 number);
extern ACPI_STATUS acpi_ForeachPackageObject(ACPI_OBJECT *obj, ACPI_STATUS acpi_ForeachPackageObject(ACPI_OBJECT *obj,
void (*func)(ACPI_OBJECT *comp, void *arg), void (*func)(ACPI_OBJECT *comp, void *arg), void *arg);
void *arg); ACPI_STATUS acpi_FindIndexedResource(ACPI_BUFFER *buf, int index,
extern ACPI_STATUS acpi_FindIndexedResource(ACPI_BUFFER *buf, int index, ACPI_RESOURCE **resp);
ACPI_RESOURCE **resp); ACPI_STATUS acpi_AppendBufferResource(ACPI_BUFFER *buf,
extern ACPI_STATUS acpi_AppendBufferResource(ACPI_BUFFER *buf, ACPI_RESOURCE *res);
ACPI_RESOURCE *res); ACPI_STATUS acpi_OverrideInterruptLevel(UINT32 InterruptNumber);
extern ACPI_STATUS acpi_OverrideInterruptLevel(UINT32 InterruptNumber); ACPI_STATUS acpi_SetIntrModel(int model);
extern ACPI_STATUS acpi_SetIntrModel(int model); ACPI_STATUS acpi_SetSleepState(struct acpi_softc *sc, int state);
extern ACPI_STATUS acpi_SetSleepState(struct acpi_softc *sc, int state);
int acpi_wake_init(device_t dev, int type); int acpi_wake_init(device_t dev, int type);
int acpi_wake_set_enable(device_t dev, int enable); int acpi_wake_set_enable(device_t dev, int enable);
int acpi_wake_sleep_prep(device_t dev, int sstate); int acpi_wake_sleep_prep(device_t dev, int sstate);
int acpi_wake_run_prep(device_t dev); int acpi_wake_run_prep(device_t dev);
extern ACPI_STATUS acpi_Startup(void); ACPI_STATUS acpi_Startup(void);
extern ACPI_STATUS acpi_Enable(struct acpi_softc *sc); ACPI_STATUS acpi_Enable(struct acpi_softc *sc);
extern ACPI_STATUS acpi_Disable(struct acpi_softc *sc); ACPI_STATUS acpi_Disable(struct acpi_softc *sc);
extern void acpi_UserNotify(const char *subsystem, ACPI_HANDLE h, void acpi_UserNotify(const char *subsystem, ACPI_HANDLE h,
uint8_t notify); uint8_t notify);
struct resource * acpi_bus_alloc_gas(device_t dev, int *rid, struct resource *acpi_bus_alloc_gas(device_t dev, int *rid,
ACPI_GENERIC_ADDRESS *gas); ACPI_GENERIC_ADDRESS *gas);
struct acpi_parse_resource_set { struct acpi_parse_resource_set {
void (*set_init)(device_t dev, void *arg, void **context); void (*set_init)(device_t dev, void *arg, void **context);
void (*set_done)(device_t dev, void *context); void (*set_done)(device_t dev, void *context);
void (*set_ioport)(device_t dev, void *context, u_int32_t base, void (*set_ioport)(device_t dev, void *context, uint32_t base,
u_int32_t length); uint32_t length);
void (*set_iorange)(device_t dev, void *context, void (*set_iorange)(device_t dev, void *context, uint32_t low,
u_int32_t low, u_int32_t high, uint32_t high, uint32_t length, uint32_t align);
u_int32_t length, u_int32_t align); void (*set_memory)(device_t dev, void *context, uint32_t base,
void (*set_memory)(device_t dev, void *context, u_int32_t base, uint32_t length);
u_int32_t length); void (*set_memoryrange)(device_t dev, void *context, uint32_t low,
void (*set_memoryrange)(device_t dev, void *context, u_int32_t low, uint32_t high, uint32_t length, uint32_t align);
u_int32_t high, u_int32_t length,
u_int32_t align);
void (*set_irq)(device_t dev, void *context, u_int32_t *irq, void (*set_irq)(device_t dev, void *context, u_int32_t *irq,
int count, int trig, int pol); int count, int trig, int pol);
void (*set_drq)(device_t dev, void *context, u_int32_t *drq, void (*set_drq)(device_t dev, void *context, u_int32_t *drq,
int count); int count);
void (*set_start_dependant)(device_t dev, void *context, void (*set_start_dependant)(device_t dev, void *context,
int preference); int preference);
void (*set_end_dependant)(device_t dev, void *context); void (*set_end_dependant)(device_t dev, void *context);
}; };
extern struct acpi_parse_resource_set acpi_res_parse_set; extern struct acpi_parse_resource_set acpi_res_parse_set;
extern ACPI_STATUS acpi_parse_resources(device_t dev, ACPI_HANDLE handle, ACPI_STATUS acpi_parse_resources(device_t dev, ACPI_HANDLE handle,
struct acpi_parse_resource_set *set, void *arg); struct acpi_parse_resource_set *set, void *arg);
/* ACPI event handling */ /* ACPI event handling */
extern UINT32 acpi_event_power_button_sleep(void *context); UINT32 acpi_event_power_button_sleep(void *context);
extern UINT32 acpi_event_power_button_wake(void *context); UINT32 acpi_event_power_button_wake(void *context);
extern UINT32 acpi_event_sleep_button_sleep(void *context); UINT32 acpi_event_sleep_button_sleep(void *context);
extern UINT32 acpi_event_sleep_button_wake(void *context); UINT32 acpi_event_sleep_button_wake(void *context);
#define ACPI_EVENT_PRI_FIRST 0 #define ACPI_EVENT_PRI_FIRST 0
#define ACPI_EVENT_PRI_DEFAULT 10000 #define ACPI_EVENT_PRI_DEFAULT 10000
@ -281,8 +278,7 @@ EVENTHANDLER_DECLARE(acpi_sleep_event, acpi_event_handler_t);
EVENTHANDLER_DECLARE(acpi_wakeup_event, acpi_event_handler_t); EVENTHANDLER_DECLARE(acpi_wakeup_event, acpi_event_handler_t);
/* Device power control. */ /* Device power control. */
extern ACPI_STATUS acpi_pwr_switch_consumer(ACPI_HANDLE consumer, ACPI_STATUS acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state);
int state);
/* Misc. */ /* Misc. */
static __inline struct acpi_softc * static __inline struct acpi_softc *
@ -304,32 +300,30 @@ acpi_get_verbose(struct acpi_softc *sc)
return (0); return (0);
} }
extern char *acpi_name(ACPI_HANDLE handle); char *acpi_name(ACPI_HANDLE handle);
extern int acpi_avoid(ACPI_HANDLE handle); int acpi_avoid(ACPI_HANDLE handle);
extern int acpi_disabled(char *subsys); int acpi_disabled(char *subsys);
extern void acpi_device_enable_wake_capability(ACPI_HANDLE h, int enable); int acpi_machdep_init(device_t dev);
extern void acpi_device_enable_wake_event(ACPI_HANDLE h); void acpi_install_wakeup_handler(struct acpi_softc *sc);
extern int acpi_machdep_init(device_t dev); int acpi_sleep_machdep(struct acpi_softc *sc, int state);
extern void acpi_install_wakeup_handler(struct acpi_softc *sc);
extern int acpi_sleep_machdep(struct acpi_softc *sc, int state);
/* Battery Abstraction. */ /* Battery Abstraction. */
struct acpi_battinfo; struct acpi_battinfo;
struct acpi_battdesc; struct acpi_battdesc;
extern int acpi_battery_register(int, int); int acpi_battery_register(int, int);
extern int acpi_battery_get_battinfo(int, struct acpi_battinfo *); int acpi_battery_get_battinfo(int, struct acpi_battinfo *);
extern int acpi_battery_get_units(void); int acpi_battery_get_units(void);
extern int acpi_battery_get_info_expire(void); int acpi_battery_get_info_expire(void);
extern int acpi_battery_get_battdesc(int, struct acpi_battdesc *); int acpi_battery_get_battdesc(int, struct acpi_battdesc *);
extern int acpi_cmbat_get_battinfo(int, struct acpi_battinfo *); int acpi_cmbat_get_battinfo(int, struct acpi_battinfo *);
/* Embedded controller. */ /* Embedded controller. */
extern void acpi_ec_ecdt_probe(device_t); void acpi_ec_ecdt_probe(device_t);
/* AC adapter interface. */ /* AC adapter interface. */
extern int acpi_acad_get_acline(int *); int acpi_acad_get_acline(int *);
/* Package manipulation convenience functions. */ /* Package manipulation convenience functions. */
#define ACPI_PKG_VALID(pkg, size) \ #define ACPI_PKG_VALID(pkg, size) \
@ -353,5 +347,5 @@ ACPI_HANDLE acpi_GetReference(ACPI_HANDLE scope, ACPI_OBJECT *obj);
#ifdef ACPI_USE_THREADS #ifdef ACPI_USE_THREADS
/* ACPI task kernel thread initialization. */ /* ACPI task kernel thread initialization. */
extern int acpi_task_thread_init(void); int acpi_task_thread_init(void);
#endif #endif