summaryrefslogtreecommitdiffstats
path: root/include/mfd
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2016-05-16 09:45:58 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2016-05-18 07:47:51 +0200
commita6c67f15ac08aa74faaca7936b914a147299e924 (patch)
treea3e063cd2c8d97f902fa00714a6c13e1fce4b321 /include/mfd
parent04624274360a345ef3e4ce89d5553115d49bfd8f (diff)
downloadbarebox-a6c67f15ac08aa74faaca7936b914a147299e924.tar.gz
barebox-a6c67f15ac08aa74faaca7936b914a147299e924.tar.xz
syscon: Do not return NULL when driver is not selected
Both syscon_base_lookup_by_pdevname() and syscon_base_lookup_by_phandle(), when implemented, do not return NULL, so none of the code using those function is written to check for that. Change returns to ERR_PTR(-ENOSYS), to avoid having that problem. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/mfd')
-rw-r--r--include/mfd/syscon.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/mfd/syscon.h b/include/mfd/syscon.h
index 20445202b2..651d4c267c 100644
--- a/include/mfd/syscon.h
+++ b/include/mfd/syscon.h
@@ -21,13 +21,13 @@ void __iomem *syscon_base_lookup_by_phandle
#else
static inline void __iomem *syscon_base_lookup_by_pdevname(const char *s)
{
- return NULL;
+ return ERR_PTR(-ENOSYS);
}
static inline void __iomem *syscon_base_lookup_by_phandle
(struct device_node *np, const char *property)
{
- return NULL;
+ return ERR_PTR(-ENOSYS);
}
#endif