diff options
author | Nishanth Menon <nm@ti.com> | 2013-09-19 17:03:51 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@rjwysocki.net> | 2013-10-25 16:33:23 -0400 |
commit | 47d43ba73eb98d8ba731208735c899129d9849e1 (patch) | |
tree | 77a8efb02e01ab183b08bf7b88fd50d3991c0873 /include/linux/opp.h | |
parent | 5d4879cda67b09f086807821cf594ee079d6dfbe (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.h | 29 |
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 | ||
21 | struct opp; | 21 | struct dev_pm_opp; |
22 | struct device; | 22 | struct device; |
23 | 23 | ||
24 | enum opp_event { | 24 | enum 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 | ||
30 | unsigned long dev_pm_opp_get_voltage(struct opp *opp); | 30 | unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp); |
31 | 31 | ||
32 | unsigned long dev_pm_opp_get_freq(struct opp *opp); | 32 | unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp); |
33 | 33 | ||
34 | int dev_pm_opp_get_opp_count(struct device *dev); | 34 | int dev_pm_opp_get_opp_count(struct device *dev); |
35 | 35 | ||
36 | struct opp *dev_pm_opp_find_freq_exact(struct device *dev, unsigned long freq, | 36 | struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, |
37 | bool available); | 37 | unsigned long freq, |
38 | bool available); | ||
38 | 39 | ||
39 | struct opp *dev_pm_opp_find_freq_floor(struct device *dev, unsigned long *freq); | 40 | struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev, |
41 | unsigned long *freq); | ||
40 | 42 | ||
41 | struct opp *dev_pm_opp_find_freq_ceil(struct device *dev, unsigned long *freq); | 43 | struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev, |
44 | unsigned long *freq); | ||
42 | 45 | ||
43 | int dev_pm_opp_add(struct device *dev, unsigned long freq, | 46 | int 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 | ||
50 | struct srcu_notifier_head *dev_pm_opp_get_notifier(struct device *dev); | 53 | struct srcu_notifier_head *dev_pm_opp_get_notifier(struct device *dev); |
51 | #else | 54 | #else |
52 | static inline unsigned long dev_pm_opp_get_voltage(struct opp *opp) | 55 | static 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 | ||
57 | static inline unsigned long dev_pm_opp_get_freq(struct opp *opp) | 60 | static 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 | ||
67 | static inline struct opp *dev_pm_opp_find_freq_exact(struct device *dev, | 70 | static 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 | ||
73 | static inline struct opp *dev_pm_opp_find_freq_floor(struct device *dev, | 76 | static 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 | ||
79 | static inline struct opp *dev_pm_opp_find_freq_ceil(struct device *dev, | 82 | static 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); |