summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-16 00:37:42 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-19 23:37:08 +0200
commitb25c77efa71178f8281401e492e5c63cf7c34900 (patch)
treed06c5e6d10d84fcfb5880fa62d8dda98fdb3a8a9 /drivers/acpi
parent95d45d4cab6540e3f2183d86662c255fa4332331 (diff)
ACPI / PM: Rename function acpi_device_power_state() and make it static
There is a name clash between function acpi_device_power_state() defined in drivers/acpi/device_pm.c and structure type acpi_device_power_state defined in include/acpi/acpi_bus.h, which may be resolved by renaming the function. Additionally, that funtion may be made static, because it is not used anywhere outside of the file it is defined in. Rename acpi_device_power_state() to acpi_dev_pm_get_state(), which better reflects its purpose, and make it static. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/device_pm.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index 318fa32a141e..26d3fd718a04 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -399,7 +399,7 @@ bool acpi_bus_can_wakeup(acpi_handle handle)
EXPORT_SYMBOL(acpi_bus_can_wakeup);
/**
- * acpi_device_power_state - Get preferred power state of ACPI device.
+ * acpi_dev_pm_get_state - Get preferred power state of ACPI device.
* @dev: Device whose preferred target power state to return.
* @adev: ACPI device node corresponding to @dev.
* @target_state: System state to match the resultant device state.
@@ -417,8 +417,8 @@ EXPORT_SYMBOL(acpi_bus_can_wakeup);
* Callers must ensure that @dev and @adev are valid pointers and that @adev
* actually corresponds to @dev before using this function.
*/
-int acpi_device_power_state(struct device *dev, struct acpi_device *adev,
- u32 target_state, int d_max_in, int *d_min_p)
+static int acpi_dev_pm_get_state(struct device *dev, struct acpi_device *adev,
+ u32 target_state, int d_max_in, int *d_min_p)
{
char acpi_method[] = "_SxD";
unsigned long long d_min, d_max;
@@ -501,7 +501,6 @@ int acpi_device_power_state(struct device *dev, struct acpi_device *adev,
}
return d_max;
}
-EXPORT_SYMBOL_GPL(acpi_device_power_state);
/**
* acpi_pm_device_sleep_state - Get preferred power state of ACPI device.
@@ -523,8 +522,8 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p, int d_max_in)
return -ENODEV;
}
- return acpi_device_power_state(dev, adev, acpi_target_system_state(),
- d_max_in, d_min_p);
+ return acpi_dev_pm_get_state(dev, adev, acpi_target_system_state(),
+ d_max_in, d_min_p);
}
EXPORT_SYMBOL(acpi_pm_device_sleep_state);
@@ -680,8 +679,8 @@ static int acpi_dev_pm_low_power(struct device *dev, struct acpi_device *adev,
if (!acpi_device_power_manageable(adev))
return 0;
- power_state = acpi_device_power_state(dev, adev, system_state,
- ACPI_STATE_D3, NULL);
+ power_state = acpi_dev_pm_get_state(dev, adev, system_state,
+ ACPI_STATE_D3, NULL);
if (power_state < ACPI_STATE_D0 || power_state > ACPI_STATE_D3)
return -EIO;