aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-15 18:37:42 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-19 17:37:08 -0400
commitb25c77efa71178f8281401e492e5c63cf7c34900 (patch)
treed06c5e6d10d84fcfb5880fa62d8dda98fdb3a8a9 /include/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 'include/acpi')
-rw-r--r--include/acpi/acpi_bus.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 636c59f2003a..c3dc203a90f4 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -467,8 +467,6 @@ acpi_status acpi_add_pm_notifier(struct acpi_device *adev,
467 acpi_notify_handler handler, void *context); 467 acpi_notify_handler handler, void *context);
468acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, 468acpi_status acpi_remove_pm_notifier(struct acpi_device *adev,
469 acpi_notify_handler handler); 469 acpi_notify_handler handler);
470int acpi_device_power_state(struct device *dev, struct acpi_device *adev,
471 u32 target_state, int d_max_in, int *d_min_p);
472int acpi_pm_device_sleep_state(struct device *, int *, int); 470int acpi_pm_device_sleep_state(struct device *, int *, int);
473void acpi_dev_pm_add_dependent(acpi_handle handle, struct device *depdev); 471void acpi_dev_pm_add_dependent(acpi_handle handle, struct device *depdev);
474void acpi_dev_pm_remove_dependent(acpi_handle handle, struct device *depdev); 472void acpi_dev_pm_remove_dependent(acpi_handle handle, struct device *depdev);
@@ -484,23 +482,13 @@ static inline acpi_status acpi_remove_pm_notifier(struct acpi_device *adev,
484{ 482{
485 return AE_SUPPORT; 483 return AE_SUPPORT;
486} 484}
487static inline int __acpi_device_power_state(int m, int *p) 485static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m)
488{ 486{
489 if (p) 487 if (p)
490 *p = ACPI_STATE_D0; 488 *p = ACPI_STATE_D0;
489
491 return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3) ? m : ACPI_STATE_D0; 490 return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3) ? m : ACPI_STATE_D0;
492} 491}
493static inline int acpi_device_power_state(struct device *dev,
494 struct acpi_device *adev,
495 u32 target_state, int d_max_in,
496 int *d_min_p)
497{
498 return __acpi_device_power_state(d_max_in, d_min_p);
499}
500static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m)
501{
502 return __acpi_device_power_state(m, p);
503}
504static inline void acpi_dev_pm_add_dependent(acpi_handle handle, 492static inline void acpi_dev_pm_add_dependent(acpi_handle handle,
505 struct device *depdev) {} 493 struct device *depdev) {}
506static inline void acpi_dev_pm_remove_dependent(acpi_handle handle, 494static inline void acpi_dev_pm_remove_dependent(acpi_handle handle,