Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154202
b: refs/heads/master
c: aa8a149
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Jun 18, 2009
1 parent c7943d3 commit 0444e34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 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: 02c37bd8d0737c31caaed9a65bd7cb80aefb4c9a
refs/heads/master: aa8a149c0cc822e3886eb85b95cb2f7d67e5b7e6
22 changes: 3 additions & 19 deletions trunk/drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,7 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
Notification Handling
-------------------------------------------------------------------------- */

static int
acpi_bus_check_device(struct acpi_device *device, int *status_changed)
static int acpi_bus_check_device(struct acpi_device *device)
{
acpi_status status = 0;
struct acpi_device_status old_status;
Expand All @@ -460,9 +459,6 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed)
if (!device)
return -EINVAL;

if (status_changed)
*status_changed = 0;

old_status = device->status;

/*
Expand All @@ -471,10 +467,6 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed)
*/
if (device->parent && !device->parent->status.present) {
device->status = device->parent->status;
if (STRUCT_TO_INT(old_status) != STRUCT_TO_INT(device->status)) {
if (status_changed)
*status_changed = 1;
}
return 0;
}

Expand All @@ -485,9 +477,6 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed)
if (STRUCT_TO_INT(old_status) == STRUCT_TO_INT(device->status))
return 0;

if (status_changed)
*status_changed = 1;

/*
* Device Insertion/Removal
*/
Expand All @@ -505,20 +494,15 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed)
static int acpi_bus_check_scope(struct acpi_device *device)
{
int result = 0;
int status_changed = 0;


if (!device)
return -EINVAL;

/* Status Change? */
result = acpi_bus_check_device(device, &status_changed);
result = acpi_bus_check_device(device);
if (result)
return result;

if (!status_changed)
return 0;

/*
* TBD: Enumerate child devices within this device's scope and
* run acpi_bus_check_device()'s on them.
Expand Down Expand Up @@ -571,7 +555,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
break;

case ACPI_NOTIFY_DEVICE_CHECK:
result = acpi_bus_check_device(device, NULL);
result = acpi_bus_check_device(device);
/*
* TBD: We'll need to outsource certain events to non-ACPI
* drivers via the device manager (device.c).
Expand Down

0 comments on commit 0444e34

Please sign in to comment.