diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-05-22 13:43:46 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-06-18 00:13:15 -0400 |
commit | aa8a149c0cc822e3886eb85b95cb2f7d67e5b7e6 (patch) | |
tree | 827ff46fd22d9a47b571aac728817bec53a3fd55 /drivers/acpi | |
parent | 02c37bd8d0737c31caaed9a65bd7cb80aefb4c9a (diff) |
ACPI: remove unused "status_changed" return value from Check Device handling
Remove "status_changed" return from acpi_bus_check_device(). Nobody
does anything useful based on its value.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/bus.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index eb986385c57a..19e78fb0a8d1 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -450,8 +450,7 @@ int acpi_bus_receive_event(struct acpi_bus_event *event) | |||
450 | Notification Handling | 450 | Notification Handling |
451 | -------------------------------------------------------------------------- */ | 451 | -------------------------------------------------------------------------- */ |
452 | 452 | ||
453 | static int | 453 | static int acpi_bus_check_device(struct acpi_device *device) |
454 | acpi_bus_check_device(struct acpi_device *device, int *status_changed) | ||
455 | { | 454 | { |
456 | acpi_status status = 0; | 455 | acpi_status status = 0; |
457 | struct acpi_device_status old_status; | 456 | struct acpi_device_status old_status; |
@@ -460,9 +459,6 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed) | |||
460 | if (!device) | 459 | if (!device) |
461 | return -EINVAL; | 460 | return -EINVAL; |
462 | 461 | ||
463 | if (status_changed) | ||
464 | *status_changed = 0; | ||
465 | |||
466 | old_status = device->status; | 462 | old_status = device->status; |
467 | 463 | ||
468 | /* | 464 | /* |
@@ -471,10 +467,6 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed) | |||
471 | */ | 467 | */ |
472 | if (device->parent && !device->parent->status.present) { | 468 | if (device->parent && !device->parent->status.present) { |
473 | device->status = device->parent->status; | 469 | device->status = device->parent->status; |
474 | if (STRUCT_TO_INT(old_status) != STRUCT_TO_INT(device->status)) { | ||
475 | if (status_changed) | ||
476 | *status_changed = 1; | ||
477 | } | ||
478 | return 0; | 470 | return 0; |
479 | } | 471 | } |
480 | 472 | ||
@@ -485,9 +477,6 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed) | |||
485 | if (STRUCT_TO_INT(old_status) == STRUCT_TO_INT(device->status)) | 477 | if (STRUCT_TO_INT(old_status) == STRUCT_TO_INT(device->status)) |
486 | return 0; | 478 | return 0; |
487 | 479 | ||
488 | if (status_changed) | ||
489 | *status_changed = 1; | ||
490 | |||
491 | /* | 480 | /* |
492 | * Device Insertion/Removal | 481 | * Device Insertion/Removal |
493 | */ | 482 | */ |
@@ -505,20 +494,15 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed) | |||
505 | static int acpi_bus_check_scope(struct acpi_device *device) | 494 | static int acpi_bus_check_scope(struct acpi_device *device) |
506 | { | 495 | { |
507 | int result = 0; | 496 | int result = 0; |
508 | int status_changed = 0; | ||
509 | |||
510 | 497 | ||
511 | if (!device) | 498 | if (!device) |
512 | return -EINVAL; | 499 | return -EINVAL; |
513 | 500 | ||
514 | /* Status Change? */ | 501 | /* Status Change? */ |
515 | result = acpi_bus_check_device(device, &status_changed); | 502 | result = acpi_bus_check_device(device); |
516 | if (result) | 503 | if (result) |
517 | return result; | 504 | return result; |
518 | 505 | ||
519 | if (!status_changed) | ||
520 | return 0; | ||
521 | |||
522 | /* | 506 | /* |
523 | * TBD: Enumerate child devices within this device's scope and | 507 | * TBD: Enumerate child devices within this device's scope and |
524 | * run acpi_bus_check_device()'s on them. | 508 | * run acpi_bus_check_device()'s on them. |
@@ -571,7 +555,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data) | |||
571 | break; | 555 | break; |
572 | 556 | ||
573 | case ACPI_NOTIFY_DEVICE_CHECK: | 557 | case ACPI_NOTIFY_DEVICE_CHECK: |
574 | result = acpi_bus_check_device(device, NULL); | 558 | result = acpi_bus_check_device(device); |
575 | /* | 559 | /* |
576 | * TBD: We'll need to outsource certain events to non-ACPI | 560 | * TBD: We'll need to outsource certain events to non-ACPI |
577 | * drivers via the device manager (device.c). | 561 | * drivers via the device manager (device.c). |