mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
8cd84092d3
commit
d5b040d0ca
2 changed files with 62 additions and 0 deletions
|
@ -199,6 +199,10 @@ extern int devfreq_register_opp_notifier(struct device *dev,
|
|||
struct devfreq *devfreq);
|
||||
extern int devfreq_unregister_opp_notifier(struct device *dev,
|
||||
struct devfreq *devfreq);
|
||||
extern int devm_devfreq_register_opp_notifier(struct device *dev,
|
||||
struct devfreq *devfreq);
|
||||
extern void devm_devfreq_unregister_opp_notifier(struct device *dev,
|
||||
struct devfreq *devfreq);
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
|
||||
/**
|
||||
|
@ -275,6 +279,16 @@ static inline int devfreq_unregister_opp_notifier(struct device *dev,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int devm_devfreq_register_opp_notifier(struct device *dev,
|
||||
struct devfreq *devfreq)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline void devm_devfreq_unregister_opp_notifier(struct device *dev,
|
||||
struct devfreq *devfreq)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_PM_DEVFREQ */
|
||||
|
||||
#endif /* __LINUX_DEVFREQ_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue