PM / devfreq: Add devm_devfreq_{register,unregister}_opp_notfier function
[deliverable/linux.git] / include / linux / devfreq.h
index 023d668a2cb5e37e269fd9805f2b631ec9ceab9a..f1863dcd83eaf4070cc83762ce9864b9826e1c0e 100644 (file)
@@ -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__ */
This page took 0.02824 seconds and 5 git commands to generate.