diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-04-07 17:32:43 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-04-08 20:55:40 +0300 |
commit | f5d9ab1d803456f5215f853e9286659933b59afe (patch) | |
tree | 910d7eebac17a7d08b6e7b9dab340e1f3b5d92fb /drivers/acpi/power.c | |
parent | f926e94338158a5f84cbe4b0c7a9438c303762f8 (diff) | |
download | linux-f5d9ab1d803456f5215f853e9286659933b59afe.tar.xz |
ACPI: scan: Drop sta argument from acpi_init_device_object()
Use the observation that the initial status check for
ACPI_BUS_TYPE_PROCESSOR objects can be carried out in the same way
as for ACPI_BUS_TYPE_DEVICE objects and it is not necessary to fail
acpi_add_single_object() if acpi_bus_get_status_handle() returns an
error for a processor (its status can be set to 0 instead) to
simplify acpi_add_single_object().
Accordingly, drop the "sta" argument from acpi_init_device_object()
as it can always set the initial status to ACPI_STA_DEFAULT and let
its caller correct that later on.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/acpi/power.c')
-rw-r--r-- | drivers/acpi/power.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 9b608b55d2b2..664e2e94ce61 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -925,8 +925,7 @@ int acpi_add_power_resource(acpi_handle handle) return -ENOMEM; device = &resource->device; - acpi_init_device_object(device, handle, ACPI_BUS_TYPE_POWER, - ACPI_STA_DEFAULT, NULL); + acpi_init_device_object(device, handle, ACPI_BUS_TYPE_POWER, NULL); mutex_init(&resource->resource_lock); INIT_LIST_HEAD(&resource->list_node); INIT_LIST_HEAD(&resource->dependents); |