lkml.org 
[lkml]   [2014]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V2 1/7] opp: remove -ENOSYS from dummy implementation of of_init_opp_table()
Date
When any of CONFIG_PM_OPP or CONFIG_OF isn't enabled we have a dummy
implementation of of_init_opp_table() routine, it returns -EINVAL currently.
-EINVAL can be returned from other places within the real implementations of
of_init_opp_table() and so caller wouldn't be able to differentiate between
those two cases.

Make it return -ENOSYS instead for better handling.

Suggested-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
include/linux/pm_opp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index 0330217..6668150 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -112,7 +112,7 @@ int of_init_opp_table(struct device *dev);
#else
static inline int of_init_opp_table(struct device *dev)
{
- return -EINVAL;
+ return -ENOSYS;
}
#endif

--
2.0.0.rc2


\
 
 \ /
  Last update: 2014-05-21 13:41    [W:0.136 / U:7.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site