Match namespace cleanup changes in ACPI CA 20020217 update.
Use ACPI_SUCCESS/ACPI_FAILURE consistently.
This commit is contained in:
parent
dbd0058a4e
commit
9127281c88
@ -46,7 +46,7 @@
|
||||
* Hooks for the ACPI CA debugging infrastructure
|
||||
*/
|
||||
#define _COMPONENT ACPI_AC_ADAPTER
|
||||
MODULE_NAME("AC_ADAPTER")
|
||||
ACPI_MODULE_NAME("AC_ADAPTER")
|
||||
|
||||
#define ACPI_DEVICE_CHECK_PNP 0x00
|
||||
#define ACPI_DEVICE_CHECK_EXISTENCE 0x01
|
||||
@ -71,7 +71,7 @@ acpi_acad_get_status(void *context)
|
||||
struct acpi_acad_softc *sc = device_get_softc(dev);
|
||||
ACPI_HANDLE h = acpi_get_handle(dev);
|
||||
|
||||
if (acpi_EvaluateInteger(h, "_PSR", &newstatus) != AE_OK) {
|
||||
if (ACPI_FAILURE(acpi_EvaluateInteger(h, "_PSR", &newstatus))) {
|
||||
sc->status = -1;
|
||||
return;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@
|
||||
* Hooks for the ACPI CA debugging infrastructure
|
||||
*/
|
||||
#define _COMPONENT ACPI_BUTTON
|
||||
MODULE_NAME("BUTTON")
|
||||
ACPI_MODULE_NAME("BUTTON")
|
||||
|
||||
struct acpi_button_softc {
|
||||
device_t button_dev;
|
||||
@ -103,14 +103,14 @@ acpi_button_attach(device_t dev)
|
||||
struct acpi_button_softc *sc;
|
||||
ACPI_STATUS status;
|
||||
|
||||
FUNCTION_TRACE(__func__);
|
||||
ACPI_FUNCTION_TRACE(__func__);
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
sc->button_dev = dev;
|
||||
sc->button_handle = acpi_get_handle(dev);
|
||||
|
||||
if ((status = AcpiInstallNotifyHandler(sc->button_handle, ACPI_DEVICE_NOTIFY,
|
||||
acpi_button_notify_handler, sc)) != AE_OK) {
|
||||
if (ACPI_FAILURE(status = AcpiInstallNotifyHandler(sc->button_handle, ACPI_DEVICE_NOTIFY,
|
||||
acpi_button_notify_handler, sc))) {
|
||||
device_printf(sc->button_dev, "couldn't install Notify handler - %s\n", AcpiFormatException(status));
|
||||
return_VALUE(ENXIO);
|
||||
}
|
||||
@ -123,7 +123,7 @@ acpi_button_notify_pressed_for_sleep(void *arg)
|
||||
struct acpi_button_softc *sc;
|
||||
struct acpi_softc *acpi_sc;
|
||||
|
||||
FUNCTION_TRACE(__func__);
|
||||
ACPI_FUNCTION_TRACE(__func__);
|
||||
|
||||
sc = (struct acpi_button_softc *)arg;
|
||||
acpi_sc = acpi_device_get_parent_softc(sc->button_dev);
|
||||
@ -154,7 +154,7 @@ acpi_button_notify_pressed_for_wakeup(void *arg)
|
||||
struct acpi_button_softc *sc;
|
||||
struct acpi_softc *acpi_sc;
|
||||
|
||||
FUNCTION_TRACE(__func__);
|
||||
ACPI_FUNCTION_TRACE(__func__);
|
||||
|
||||
sc = (struct acpi_button_softc *)arg;
|
||||
acpi_sc = acpi_device_get_parent_softc(sc->button_dev);
|
||||
@ -188,7 +188,7 @@ acpi_button_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context)
|
||||
{
|
||||
struct acpi_button_softc *sc = (struct acpi_button_softc *)context;
|
||||
|
||||
FUNCTION_TRACE_U32(__func__, notify);
|
||||
ACPI_FUNCTION_TRACE_U32(__func__, notify);
|
||||
|
||||
switch (notify) {
|
||||
case ACPI_NOTIFY_BUTTON_PRESSED_FOR_SLEEP:
|
||||
|
@ -52,7 +52,7 @@
|
||||
* Hooks for the ACPI CA debugging infrastructure
|
||||
*/
|
||||
#define _COMPONENT ACPI_PROCESSOR
|
||||
MODULE_NAME("PROCESSOR")
|
||||
ACPI_MODULE_NAME("PROCESSOR")
|
||||
|
||||
struct acpi_cpu_softc {
|
||||
device_t cpu_dev;
|
||||
@ -143,7 +143,7 @@ acpi_cpu_attach(device_t dev)
|
||||
u_int32_t duty_end;
|
||||
int rid;
|
||||
|
||||
FUNCTION_TRACE(__func__);
|
||||
ACPI_FUNCTION_TRACE(__func__);
|
||||
|
||||
ACPI_ASSERTLOCK;
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
* Hooks for the ACPI CA debugging infrastructure
|
||||
*/
|
||||
#define _COMPONENT ACPI_BUTTON
|
||||
MODULE_NAME("LID")
|
||||
ACPI_MODULE_NAME("LID")
|
||||
|
||||
struct acpi_lid_softc {
|
||||
device_t lid_dev;
|
||||
@ -92,7 +92,7 @@ acpi_lid_attach(device_t dev)
|
||||
{
|
||||
struct acpi_lid_softc *sc;
|
||||
|
||||
FUNCTION_TRACE(__func__);
|
||||
ACPI_FUNCTION_TRACE(__func__);
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
sc->lid_dev = dev;
|
||||
@ -111,7 +111,7 @@ acpi_lid_notify_status_changed(void *arg)
|
||||
struct acpi_lid_softc *sc;
|
||||
struct acpi_softc *acpi_sc;
|
||||
|
||||
FUNCTION_TRACE(__func__);
|
||||
ACPI_FUNCTION_TRACE(__func__);
|
||||
|
||||
sc = (struct acpi_lid_softc *)arg;
|
||||
|
||||
@ -120,7 +120,7 @@ acpi_lid_notify_status_changed(void *arg)
|
||||
* Zero: The lid is closed
|
||||
* Non-zero: The lid is open
|
||||
*/
|
||||
if (acpi_EvaluateInteger(sc->lid_handle, "_LID", &sc->lid_status) != AE_OK)
|
||||
if (ACPI_FAILURE(acpi_EvaluateInteger(sc->lid_handle, "_LID", &sc->lid_status)))
|
||||
return_VOID;
|
||||
|
||||
acpi_sc = acpi_device_get_parent_softc(sc->lid_dev);
|
||||
@ -148,7 +148,7 @@ acpi_lid_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context)
|
||||
{
|
||||
struct acpi_lid_softc *sc = (struct acpi_lid_softc *)context;
|
||||
|
||||
FUNCTION_TRACE_U32(__func__, notify);
|
||||
ACPI_FUNCTION_TRACE_U32(__func__, notify);
|
||||
|
||||
switch (notify) {
|
||||
case ACPI_NOTIFY_STATUS_CHANGED:
|
||||
|
Loading…
Reference in New Issue
Block a user