aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/opp.h
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2013-09-19 17:03:51 -0400
committerRafael J. Wysocki <rjw@rjwysocki.net>2013-10-25 16:33:23 -0400
commit47d43ba73eb98d8ba731208735c899129d9849e1 (patch)
tree77a8efb02e01ab183b08bf7b88fd50d3991c0873 /include/linux/opp.h
parent5d4879cda67b09f086807821cf594ee079d6dfbe (diff)
PM / OPP: rename data structures to dev_pm equivalents
Since Operating Performance Points (OPP) data structures are specific to device specific power management, be specific and rename opp_* data structures in OPP library with dev_pm_opp_* equivalent. Affected structures are: struct opp enum opp_event Minor checkpatch warning resulting of this change was fixed as well. Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/opp.h')
-rw-r--r--include/linux/opp.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/include/linux/opp.h b/include/linux/opp.h
index 2066ae5880c6..5151b0059585 100644
--- a/include/linux/opp.h
+++ b/include/linux/opp.h
@@ -18,27 +18,30 @@
18#include <linux/cpufreq.h> 18#include <linux/cpufreq.h>
19#include <linux/notifier.h> 19#include <linux/notifier.h>
20 20
21struct opp; 21struct dev_pm_opp;
22struct device; 22struct device;
23 23
24enum opp_event { 24enum dev_pm_opp_event {
25 OPP_EVENT_ADD, OPP_EVENT_ENABLE, OPP_EVENT_DISABLE, 25 OPP_EVENT_ADD, OPP_EVENT_ENABLE, OPP_EVENT_DISABLE,
26}; 26};
27 27
28#if defined(CONFIG_PM_OPP) 28#if defined(CONFIG_PM_OPP)
29 29
30unsigned long dev_pm_opp_get_voltage(struct opp *opp); 30unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp);
31 31
32unsigned long dev_pm_opp_get_freq(struct opp *opp); 32unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp);
33 33
34int dev_pm_opp_get_opp_count(struct device *dev); 34int dev_pm_opp_get_opp_count(struct device *dev);
35 35
36struct opp *dev_pm_opp_find_freq_exact(struct device *dev, unsigned long freq, 36struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
37 bool available); 37 unsigned long freq,
38 bool available);
38 39
39struct opp *dev_pm_opp_find_freq_floor(struct device *dev, unsigned long *freq); 40struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev,
41 unsigned long *freq);
40 42
41struct opp *dev_pm_opp_find_freq_ceil(struct device *dev, unsigned long *freq); 43struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev,
44 unsigned long *freq);
42 45
43int dev_pm_opp_add(struct device *dev, unsigned long freq, 46int dev_pm_opp_add(struct device *dev, unsigned long freq,
44 unsigned long u_volt); 47 unsigned long u_volt);
@@ -49,12 +52,12 @@ int dev_pm_opp_disable(struct device *dev, unsigned long freq);
49 52
50struct srcu_notifier_head *dev_pm_opp_get_notifier(struct device *dev); 53struct srcu_notifier_head *dev_pm_opp_get_notifier(struct device *dev);
51#else 54#else
52static inline unsigned long dev_pm_opp_get_voltage(struct opp *opp) 55static inline unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp)
53{ 56{
54 return 0; 57 return 0;
55} 58}
56 59
57static inline unsigned long dev_pm_opp_get_freq(struct opp *opp) 60static inline unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp)
58{ 61{
59 return 0; 62 return 0;
60} 63}
@@ -64,19 +67,19 @@ static inline int dev_pm_opp_get_opp_count(struct device *dev)
64 return 0; 67 return 0;
65} 68}
66 69
67static inline struct opp *dev_pm_opp_find_freq_exact(struct device *dev, 70static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
68 unsigned long freq, bool available) 71 unsigned long freq, bool available)
69{ 72{
70 return ERR_PTR(-EINVAL); 73 return ERR_PTR(-EINVAL);
71} 74}
72 75
73static inline struct opp *dev_pm_opp_find_freq_floor(struct device *dev, 76static inline struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev,
74 unsigned long *freq) 77 unsigned long *freq)
75{ 78{
76 return ERR_PTR(-EINVAL); 79 return ERR_PTR(-EINVAL);
77} 80}
78 81
79static inline struct opp *dev_pm_opp_find_freq_ceil(struct device *dev, 82static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev,
80 unsigned long *freq) 83 unsigned long *freq)
81{ 84{
82 return ERR_PTR(-EINVAL); 85 return ERR_PTR(-EINVAL);