aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-04-26 23:22:21 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-04-28 09:18:18 -0400
commitd708b384c06dddeb35d46a6127c08a7403fa2faf (patch)
treeb64b0b9f614ed7432a03c1bb6e6b0b6820cede8d
parent46e7a4e18397649fe1b9007ad99707d960eb138e (diff)
PM / OPP: -ENOSYS is applicable only to syscalls
Some of the routines have used -ENOSYS for the cases where the functionality isn't implemented in the kernel. But ENOSYS is supposed to be used only for syscalls. Replace that with -ENOTSUPP, which specifically means that the operation isn't supported. While at it, replace exiting -EINVAL errors for similar cases to -ENOTSUPP. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--include/linux/pm_opp.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index 5b6ad31403a5..a2df8f6fcc25 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -110,25 +110,25 @@ static inline struct dev_pm_opp *dev_pm_opp_get_suspend_opp(struct device *dev)
110static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, 110static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
111 unsigned long freq, bool available) 111 unsigned long freq, bool available)
112{ 112{
113 return ERR_PTR(-EINVAL); 113 return ERR_PTR(-ENOTSUPP);
114} 114}
115 115
116static inline struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev, 116static inline struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev,
117 unsigned long *freq) 117 unsigned long *freq)
118{ 118{
119 return ERR_PTR(-EINVAL); 119 return ERR_PTR(-ENOTSUPP);
120} 120}
121 121
122static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev, 122static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev,
123 unsigned long *freq) 123 unsigned long *freq)
124{ 124{
125 return ERR_PTR(-EINVAL); 125 return ERR_PTR(-ENOTSUPP);
126} 126}
127 127
128static inline int dev_pm_opp_add(struct device *dev, unsigned long freq, 128static inline int dev_pm_opp_add(struct device *dev, unsigned long freq,
129 unsigned long u_volt) 129 unsigned long u_volt)
130{ 130{
131 return -EINVAL; 131 return -ENOTSUPP;
132} 132}
133 133
134static inline void dev_pm_opp_remove(struct device *dev, unsigned long freq) 134static inline void dev_pm_opp_remove(struct device *dev, unsigned long freq)
@@ -148,40 +148,40 @@ static inline int dev_pm_opp_disable(struct device *dev, unsigned long freq)
148static inline struct srcu_notifier_head *dev_pm_opp_get_notifier( 148static inline struct srcu_notifier_head *dev_pm_opp_get_notifier(
149 struct device *dev) 149 struct device *dev)
150{ 150{
151 return ERR_PTR(-EINVAL); 151 return ERR_PTR(-ENOTSUPP);
152} 152}
153 153
154static inline int dev_pm_opp_set_supported_hw(struct device *dev, 154static inline int dev_pm_opp_set_supported_hw(struct device *dev,
155 const u32 *versions, 155 const u32 *versions,
156 unsigned int count) 156 unsigned int count)
157{ 157{
158 return -EINVAL; 158 return -ENOTSUPP;
159} 159}
160 160
161static inline void dev_pm_opp_put_supported_hw(struct device *dev) {} 161static inline void dev_pm_opp_put_supported_hw(struct device *dev) {}
162 162
163static inline int dev_pm_opp_set_prop_name(struct device *dev, const char *name) 163static inline int dev_pm_opp_set_prop_name(struct device *dev, const char *name)
164{ 164{
165 return -EINVAL; 165 return -ENOTSUPP;
166} 166}
167 167
168static inline void dev_pm_opp_put_prop_name(struct device *dev) {} 168static inline void dev_pm_opp_put_prop_name(struct device *dev) {}
169 169
170static inline int dev_pm_opp_set_regulator(struct device *dev, const char *name) 170static inline int dev_pm_opp_set_regulator(struct device *dev, const char *name)
171{ 171{
172 return -EINVAL; 172 return -ENOTSUPP;
173} 173}
174 174
175static inline void dev_pm_opp_put_regulator(struct device *dev) {} 175static inline void dev_pm_opp_put_regulator(struct device *dev) {}
176 176
177static inline int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq) 177static inline int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq)
178{ 178{
179 return -EINVAL; 179 return -ENOTSUPP;
180} 180}
181 181
182static inline int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) 182static inline int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask)
183{ 183{
184 return -ENOSYS; 184 return -ENOTSUPP;
185} 185}
186 186
187#endif /* CONFIG_PM_OPP */ 187#endif /* CONFIG_PM_OPP */
@@ -195,7 +195,7 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask
195#else 195#else
196static inline int dev_pm_opp_of_add_table(struct device *dev) 196static inline int dev_pm_opp_of_add_table(struct device *dev)
197{ 197{
198 return -EINVAL; 198 return -ENOTSUPP;
199} 199}
200 200
201static inline void dev_pm_opp_of_remove_table(struct device *dev) 201static inline void dev_pm_opp_of_remove_table(struct device *dev)
@@ -204,7 +204,7 @@ static inline void dev_pm_opp_of_remove_table(struct device *dev)
204 204
205static inline int dev_pm_opp_of_cpumask_add_table(cpumask_var_t cpumask) 205static inline int dev_pm_opp_of_cpumask_add_table(cpumask_var_t cpumask)
206{ 206{
207 return -ENOSYS; 207 return -ENOTSUPP;
208} 208}
209 209
210static inline void dev_pm_opp_of_cpumask_remove_table(cpumask_var_t cpumask) 210static inline void dev_pm_opp_of_cpumask_remove_table(cpumask_var_t cpumask)
@@ -213,7 +213,7 @@ static inline void dev_pm_opp_of_cpumask_remove_table(cpumask_var_t cpumask)
213 213
214static inline int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) 214static inline int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask)
215{ 215{
216 return -ENOSYS; 216 return -ENOTSUPP;
217} 217}
218#endif 218#endif
219 219