summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-11-06 00:37:08 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-11-08 02:23:21 +0100
commitc16561e8df7a64764ef61f02221e98273add325a (patch)
tree2fe88df755165595bcada53e2b9fa4554377fca5 /include
parent0df1f2487d2f0d04703f142813d53615d62a1da4 (diff)
downloadlinux-c16561e8df7a64764ef61f02221e98273add325a.tar.bz2
PM / Domains: Change prototype for the attach and detach callbacks
Convert the prototypes to return an int in order to support error handling in these callbacks. Also, as suggested by Dmitry Torokhov, pass the domain pointer for use inside the callbacks, and so that they match the existing power_on/power_off callbacks which currently take the domain pointer. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> [ khilman: added domain as parameter to callbacks, as suggested by Dmitry ] Signed-off-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pm_domain.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index 73e938b7e937..b3ed7766a291 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -72,8 +72,10 @@ struct generic_pm_domain {
bool max_off_time_changed;
bool cached_power_down_ok;
struct gpd_cpuidle_data *cpuidle_data;
- void (*attach_dev)(struct device *dev);
- void (*detach_dev)(struct device *dev);
+ int (*attach_dev)(struct generic_pm_domain *domain,
+ struct device *dev);
+ void (*detach_dev)(struct generic_pm_domain *domain,
+ struct device *dev);
};
static inline struct generic_pm_domain *pd_to_genpd(struct dev_pm_domain *pd)