diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2017-06-06 12:37:36 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-06-22 02:55:34 +0200 |
commit | cde1f95f407a593ad6baf1b7b01daa2c6cbd34fd (patch) | |
tree | 2797687bbdb77a7a23b39b3d55dd955bf42bdfcc /drivers/acpi/device_pm.c | |
parent | 2b8153421de8c29864cb147f241804858440bfa1 (diff) | |
download | linux-cde1f95f407a593ad6baf1b7b01daa2c6cbd34fd.tar.gz linux-cde1f95f407a593ad6baf1b7b01daa2c6cbd34fd.tar.bz2 linux-cde1f95f407a593ad6baf1b7b01daa2c6cbd34fd.zip |
ACPI: Constify argument to acpi_device_is_present()
This will be needed in constifying the fwnode API.
The side effects the function had have been moved to the callers.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/device_pm.c')
-rw-r--r-- | drivers/acpi/device_pm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index 993fd31394c8..e565ed329f11 100644 --- a/drivers/acpi/device_pm.c +++ b/drivers/acpi/device_pm.c @@ -261,8 +261,10 @@ int acpi_bus_init_power(struct acpi_device *device) return -EINVAL; device->power.state = ACPI_STATE_UNKNOWN; - if (!acpi_device_is_present(device)) + if (!acpi_device_is_present(device)) { + device->flags.initialized = false; return -ENXIO; + } result = acpi_device_get_power(device, &state); if (result) |