From d30d819dc83107812d9b2876e5e7194e511ed6af Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 27 Nov 2014 22:38:05 +0100 Subject: PM: Drop CONFIG_PM_RUNTIME from the driver core After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so quite a few depend on CONFIG_PM or even may be dropped entirely in some cases. Replace CONFIG_PM_RUNTIME with CONFIG_PM in the PM core code. Reviewed-by: Ulf Hansson Acked-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki --- drivers/base/power/sysfs.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'drivers/base/power/sysfs.c') diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c index a9d26ed11bf4..d2be3f9c211c 100644 --- a/drivers/base/power/sysfs.c +++ b/drivers/base/power/sysfs.c @@ -95,7 +95,6 @@ const char power_group_name[] = "power"; EXPORT_SYMBOL_GPL(power_group_name); -#ifdef CONFIG_PM_RUNTIME static const char ctrl_auto[] = "auto"; static const char ctrl_on[] = "on"; @@ -330,7 +329,6 @@ static ssize_t pm_qos_remote_wakeup_store(struct device *dev, static DEVICE_ATTR(pm_qos_remote_wakeup, 0644, pm_qos_remote_wakeup_show, pm_qos_remote_wakeup_store); -#endif /* CONFIG_PM_RUNTIME */ #ifdef CONFIG_PM_SLEEP static const char _enabled[] = "enabled"; @@ -531,8 +529,6 @@ static DEVICE_ATTR(wakeup_prevent_sleep_time_ms, 0444, #endif /* CONFIG_PM_SLEEP */ #ifdef CONFIG_PM_ADVANCED_DEBUG -#ifdef CONFIG_PM_RUNTIME - static ssize_t rtpm_usagecount_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -562,10 +558,7 @@ static DEVICE_ATTR(runtime_usage, 0444, rtpm_usagecount_show, NULL); static DEVICE_ATTR(runtime_active_kids, 0444, rtpm_children_show, NULL); static DEVICE_ATTR(runtime_enabled, 0444, rtpm_enabled_show, NULL); -#endif - #ifdef CONFIG_PM_SLEEP - static ssize_t async_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -595,7 +588,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr, static DEVICE_ATTR(async, 0644, async_show, async_store); -#endif +#endif /* CONFIG_PM_SLEEP */ #endif /* CONFIG_PM_ADVANCED_DEBUG */ static struct attribute *power_attrs[] = { @@ -603,12 +596,10 @@ static struct attribute *power_attrs[] = { #ifdef CONFIG_PM_SLEEP &dev_attr_async.attr, #endif -#ifdef CONFIG_PM_RUNTIME &dev_attr_runtime_status.attr, &dev_attr_runtime_usage.attr, &dev_attr_runtime_active_kids.attr, &dev_attr_runtime_enabled.attr, -#endif #endif /* CONFIG_PM_ADVANCED_DEBUG */ NULL, }; @@ -640,7 +631,6 @@ static struct attribute_group pm_wakeup_attr_group = { }; static struct attribute *runtime_attrs[] = { -#ifdef CONFIG_PM_RUNTIME #ifndef CONFIG_PM_ADVANCED_DEBUG &dev_attr_runtime_status.attr, #endif @@ -648,7 +638,6 @@ static struct attribute *runtime_attrs[] = { &dev_attr_runtime_suspended_time.attr, &dev_attr_runtime_active_time.attr, &dev_attr_autosuspend_delay_ms.attr, -#endif /* CONFIG_PM_RUNTIME */ NULL, }; static struct attribute_group pm_runtime_attr_group = { @@ -657,9 +646,7 @@ static struct attribute_group pm_runtime_attr_group = { }; static struct attribute *pm_qos_resume_latency_attrs[] = { -#ifdef CONFIG_PM_RUNTIME &dev_attr_pm_qos_resume_latency_us.attr, -#endif /* CONFIG_PM_RUNTIME */ NULL, }; static struct attribute_group pm_qos_resume_latency_attr_group = { @@ -668,9 +655,7 @@ static struct attribute_group pm_qos_resume_latency_attr_group = { }; static struct attribute *pm_qos_latency_tolerance_attrs[] = { -#ifdef CONFIG_PM_RUNTIME &dev_attr_pm_qos_latency_tolerance_us.attr, -#endif /* CONFIG_PM_RUNTIME */ NULL, }; static struct attribute_group pm_qos_latency_tolerance_attr_group = { @@ -679,10 +664,8 @@ static struct attribute_group pm_qos_latency_tolerance_attr_group = { }; static struct attribute *pm_qos_flags_attrs[] = { -#ifdef CONFIG_PM_RUNTIME &dev_attr_pm_qos_no_power_off.attr, &dev_attr_pm_qos_remote_wakeup.attr, -#endif /* CONFIG_PM_RUNTIME */ NULL, }; static struct attribute_group pm_qos_flags_attr_group = { -- cgit v1.2.3