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>
This commit is contained in:
@@ -450,8 +450,7 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
|
|||||||
Notification Handling
|
Notification Handling
|
||||||
-------------------------------------------------------------------------- */
|
-------------------------------------------------------------------------- */
|
||||||
|
|
||||||
static int
|
static int acpi_bus_check_device(struct acpi_device *device)
|
||||||
acpi_bus_check_device(struct acpi_device *device, int *status_changed)
|
|
||||||
{
|
{
|
||||||
acpi_status status = 0;
|
acpi_status status = 0;
|
||||||
struct acpi_device_status old_status;
|
struct acpi_device_status old_status;
|
||||||
@@ -460,9 +459,6 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed)
|
|||||||
if (!device)
|
if (!device)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (status_changed)
|
|
||||||
*status_changed = 0;
|
|
||||||
|
|
||||||
old_status = device->status;
|
old_status = device->status;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -471,10 +467,6 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed)
|
|||||||
*/
|
*/
|
||||||
if (device->parent && !device->parent->status.present) {
|
if (device->parent && !device->parent->status.present) {
|
||||||
device->status = device->parent->status;
|
device->status = device->parent->status;
|
||||||
if (STRUCT_TO_INT(old_status) != STRUCT_TO_INT(device->status)) {
|
|
||||||
if (status_changed)
|
|
||||||
*status_changed = 1;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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))
|
if (STRUCT_TO_INT(old_status) == STRUCT_TO_INT(device->status))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (status_changed)
|
|
||||||
*status_changed = 1;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Device Insertion/Removal
|
* Device Insertion/Removal
|
||||||
*/
|
*/
|
||||||
@@ -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)
|
static int acpi_bus_check_scope(struct acpi_device *device)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
int status_changed = 0;
|
|
||||||
|
|
||||||
|
|
||||||
if (!device)
|
if (!device)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* Status Change? */
|
/* Status Change? */
|
||||||
result = acpi_bus_check_device(device, &status_changed);
|
result = acpi_bus_check_device(device);
|
||||||
if (result)
|
if (result)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
if (!status_changed)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TBD: Enumerate child devices within this device's scope and
|
* TBD: Enumerate child devices within this device's scope and
|
||||||
* run acpi_bus_check_device()'s on them.
|
* run acpi_bus_check_device()'s on them.
|
||||||
@@ -571,7 +555,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_NOTIFY_DEVICE_CHECK:
|
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
|
* TBD: We'll need to outsource certain events to non-ACPI
|
||||||
* drivers via the device manager (device.c).
|
* drivers via the device manager (device.c).
|
||||||
|
Reference in New Issue
Block a user