include: pm_opp: define devm_* functions for notification chain
authorLukasz Luba <l.luba@partner.samsung.com>
Wed, 23 Jan 2019 20:31:47 +0000 (21:31 +0100)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:58:22 +0000 (14:58 +0900)
This patch adds needed function declarations for OPP PM notification
chain registration. The prototype of function devm_pm_opp_register_notifier()
or unregister and needed inline empty definitions in case of lack of config.

Change-Id: Ied2f7e0c59a591767fb29a25f356d31bea452e26
Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
include/linux/pm_opp.h

index 5773fdb..4533985 100644 (file)
@@ -117,6 +117,10 @@ int dev_pm_opp_disable(struct device *dev, unsigned long freq);
 
 int dev_pm_opp_register_notifier(struct device *dev, struct notifier_block *nb);
 int dev_pm_opp_unregister_notifier(struct device *dev, struct notifier_block *nb);
+int devm_pm_opp_register_notifier(struct device *dev,
+                                 struct notifier_block *nb);
+int devm_pm_opp_unregister_notifier(struct device *dev,
+                                   struct notifier_block *nb);
 
 struct opp_table *dev_pm_opp_set_supported_hw(struct device *dev, const u32 *versions, unsigned int count);
 void dev_pm_opp_put_supported_hw(struct opp_table *opp_table);
@@ -241,6 +245,18 @@ static inline int dev_pm_opp_unregister_notifier(struct device *dev, struct noti
        return -ENOTSUPP;
 }
 
+static inline int devm_pm_opp_register_notifier(struct device *dev,
+                                               struct notifier_block *nb)
+{
+       return -ENOTSUPP;
+}
+
+static inline int devm_pm_opp_unregister_notifier(struct device *dev,
+                                                 struct notifier_block *nb)
+{
+       return -ENOTSUPP;
+}
+
 static inline struct opp_table *dev_pm_opp_set_supported_hw(struct device *dev,
                                                            const u32 *versions,
                                                            unsigned int count)