Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154204
b: refs/heads/master
c: ff754e2
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Jun 18, 2009
1 parent 6cc8974 commit 192c9a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cdd5b8ca122cc4239375dee7fcdc658315c119e4
refs/heads/master: ff754e2e85557ed7244385f0f2053c80e8ac9948
30 changes: 15 additions & 15 deletions trunk/drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,14 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
Notification Handling
-------------------------------------------------------------------------- */

static void acpi_bus_check_device(struct acpi_device *device)
static void acpi_bus_check_device(acpi_handle handle)
{
struct acpi_device *device;
acpi_status status;
struct acpi_device_status old_status;

if (acpi_bus_get_device(handle, &device))
return;
if (!device)
return;

Expand Down Expand Up @@ -488,13 +491,10 @@ static void acpi_bus_check_device(struct acpi_device *device)
}
}

static void acpi_bus_check_scope(struct acpi_device *device)
static void acpi_bus_check_scope(acpi_handle handle)
{
if (!device)
return;

/* Status Change? */
acpi_bus_check_device(device);
acpi_bus_check_device(handle);

/*
* TBD: Enumerate child devices within this device's scope and
Expand Down Expand Up @@ -531,21 +531,18 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
blocking_notifier_call_chain(&acpi_bus_notify_list,
type, (void *)handle);

if (acpi_bus_get_device(handle, &device))
return;

switch (type) {

case ACPI_NOTIFY_BUS_CHECK:
acpi_bus_check_scope(device);
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:
acpi_bus_check_device(device);
acpi_bus_check_device(handle);
/*
* TBD: We'll need to outsource certain events to non-ACPI
* drivers via the device manager (device.c).
Expand Down Expand Up @@ -583,10 +580,13 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
break;
}

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) {
driver = device->driver;
if (driver && driver->ops.notify &&
(driver->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS))
driver->ops.notify(device, type);
}
}

/* --------------------------------------------------------------------------
Expand Down

0 comments on commit 192c9a5

Please sign in to comment.