aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/device_pm.c
diff options
context:
space:
mode:
authorSakari Ailus <[email protected]>2017-06-06 09:37:36 +0000
committerRafael J. Wysocki <[email protected]>2017-06-22 00:55:34 +0000
commitcde1f95f407a593ad6baf1b7b01daa2c6cbd34fd (patch)
tree2797687bbdb77a7a23b39b3d55dd955bf42bdfcc /drivers/acpi/device_pm.c
parentMerge branch 'dt/property-move' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
downloadkernel-cde1f95f407a593ad6baf1b7b01daa2c6cbd34fd.tar.gz
kernel-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 <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'drivers/acpi/device_pm.c')
-rw-r--r--drivers/acpi/device_pm.c4
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)