aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2014-05-09 03:43:09 -0400
committerMyungJoo Ham <myungjoo.ham@samsung.com>2014-05-24 09:33:41 -0400
commitd5b040d0cab9cae1dc1ad61a07019062235f4878 (patch)
tree5a07548db72e502f84692e9fa7d9e14287ffd9cb /include/linux
parent8cd84092d35e52372da2c3c3c2afb1a719917af2 (diff)
PM / devfreq: Add devm_devfreq_{register,unregister}_opp_notfier function
This patch add resource-managed function for devfreq opp as following functions. The devm_devfreq_register_opp_notifier() manages automatically the registration of devfreq opp using device resource management. - devm_devfreq_register_opp_notifier - devm_devfreq_unregister_opp_notifier() Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/devfreq.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index 023d668a2cb5..f1863dcd83ea 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -199,6 +199,10 @@ extern int devfreq_register_opp_notifier(struct device *dev,
199 struct devfreq *devfreq); 199 struct devfreq *devfreq);
200extern int devfreq_unregister_opp_notifier(struct device *dev, 200extern int devfreq_unregister_opp_notifier(struct device *dev,
201 struct devfreq *devfreq); 201 struct devfreq *devfreq);
202extern int devm_devfreq_register_opp_notifier(struct device *dev,
203 struct devfreq *devfreq);
204extern void devm_devfreq_unregister_opp_notifier(struct device *dev,
205 struct devfreq *devfreq);
202 206
203#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND) 207#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
204/** 208/**
@@ -275,6 +279,16 @@ static inline int devfreq_unregister_opp_notifier(struct device *dev,
275 return -EINVAL; 279 return -EINVAL;
276} 280}
277 281
282static inline int devm_devfreq_register_opp_notifier(struct device *dev,
283 struct devfreq *devfreq)
284{
285 return -EINVAL;
286}
287
288static inline void devm_devfreq_unregister_opp_notifier(struct device *dev,
289 struct devfreq *devfreq)
290{
291}
278#endif /* CONFIG_PM_DEVFREQ */ 292#endif /* CONFIG_PM_DEVFREQ */
279 293
280#endif /* __LINUX_DEVFREQ_H__ */ 294#endif /* __LINUX_DEVFREQ_H__ */