Index: drivers/bus/acpi/busmgr/bus.c =================================================================== --- drivers/bus/acpi/busmgr/bus.c (revision 63182) +++ drivers/bus/acpi/busmgr/bus.c (working copy) @@ -1,4 +1,4 @@ -/* + /* * acpi_bus.c - ACPI Bus Driver ($Revision: 80 $) * * Copyright (C) 2001, 2002 Paul Diefenbaugh @@ -709,93 +709,85 @@ */ static void acpi_bus_notify ( - ACPI_HANDLE handle, - UINT32 type, - void *data) + ACPI_HANDLE handle, + UINT32 type, + void *data) { - struct acpi_device *device = NULL; - struct acpi_driver *driver; + struct acpi_device *device = NULL; + struct acpi_driver *driver; + + DPRINT1("Notification %#02x to handle %p\n", type, handle); + + //blocking_notifier_call_chain(&acpi_bus_notify_list, + // type, (void *)handle); + + switch (type) { + + case ACPI_NOTIFY_BUS_CHECK: + DPRINT("Received BUS CHECK notification..."); + acpi_bus_check_scope(handle); + /* + * TBD: We'll need to outsource certain events to non-ACPI + * drivers via the device manager (device.c). + */ + break; + + case ACPI_NOTIFY_DEVICE_CHECK: + DPRINT("Received DEVICE CHECK notification..."); + acpi_bus_check_device(handle); + /* + * TBD: We'll need to outsource certain events to non-ACPI + * drivers via the device manager (device.c). + */ + break; + + case ACPI_NOTIFY_DEVICE_WAKE: + DPRINT("Received DEVICE WAKE notification..."); + acpi_bus_check_device(handle); + /* + * TBD: We'll need to outsource certain events to non-ACPI + * drivers via the device manager (device.c). + */ + break; + + case ACPI_NOTIFY_EJECT_REQUEST: + DPRINT1("Received EJECT REQUEST notification..."); + /* TBD */ + break; + + case ACPI_NOTIFY_DEVICE_CHECK_LIGHT: + DPRINT1("Received DEVICE CHECK LIGHT notification..."); + /* TBD: Exactly what does 'light' mean? */ + break; + + case ACPI_NOTIFY_FREQUENCY_MISMATCH: + DPRINT1("Received FREQUENCY MISMATCH notification..."); + /* TBD */ + break; + + case ACPI_NOTIFY_BUS_MODE_MISMATCH: + DPRINT1("Received BUS MODE MISMATCH notification..."); + /* TBD */ + break; + + case ACPI_NOTIFY_POWER_FAULT: + DPRINT1("Received POWER FAULT notification..."); + /* TBD */ + break; + + default: + DPRINT1("Received unknown/unsupported notification [%08x]\n", type); + break; + } - DPRINT1("Notification %#02x to handle %p\n", type, handle); - - //blocking_notifier_call_chain(&acpi_bus_notify_list, - // type, (void *)handle); - - switch (type) { - - case ACPI_NOTIFY_BUS_CHECK: - DPRINT("Received BUS CHECK notification for device [%s]\n", - device->pnp.bus_id); - acpi_bus_check_scope(handle); - /* - * TBD: We'll need to outsource certain events to non-ACPI - * drivers via the device manager (device.c). - */ - break; - - case ACPI_NOTIFY_DEVICE_CHECK: - DPRINT("Received DEVICE CHECK notification for device [%s]\n", - device->pnp.bus_id); - acpi_bus_check_device(handle); - /* - * TBD: We'll need to outsource certain events to non-ACPI - * drivers via the device manager (device.c). - */ - break; - - case ACPI_NOTIFY_DEVICE_WAKE: - DPRINT("Received DEVICE WAKE notification for device [%s]\n", - device->pnp.bus_id); - acpi_bus_check_device(handle); - /* - * TBD: We'll need to outsource certain events to non-ACPI - * drivers via the device manager (device.c). - */ - break; - - case ACPI_NOTIFY_EJECT_REQUEST: - DPRINT1("Received EJECT REQUEST notification for device [%s]\n", - device->pnp.bus_id); - /* TBD */ - break; - - case ACPI_NOTIFY_DEVICE_CHECK_LIGHT: - DPRINT1("Received DEVICE CHECK LIGHT notification for device [%s]\n", - device->pnp.bus_id); - /* TBD: Exactly what does 'light' mean? */ - break; - - case ACPI_NOTIFY_FREQUENCY_MISMATCH: - DPRINT1("Received FREQUENCY MISMATCH notification for device [%s]\n", - device->pnp.bus_id); - /* TBD */ - break; - - case ACPI_NOTIFY_BUS_MODE_MISMATCH: - DPRINT1("Received BUS MODE MISMATCH notification for device [%s]\n", - device->pnp.bus_id); - /* TBD */ - break; - - case ACPI_NOTIFY_POWER_FAULT: - DPRINT1("Received POWER FAULT notification for device [%s]\n", - device->pnp.bus_id); - /* TBD */ - break; - - default: - DPRINT1("Received unknown/unsupported notification [%08x]\n", - type); - break; - } - - acpi_bus_get_device(handle, &device); - if (device) { - driver = device->driver; - if (driver && driver->ops.notify && - (driver->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS)) - driver->ops.notify(device, type); - } + acpi_bus_get_device(handle, &device); + if (device) { + DPRINT("...for device [%s] \n", device->pnp.bus_id); + driver = device->driver; + if (driver && driver->ops.notify && + (driver->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS)) + driver->ops.notify(device, type); + } }