diff options
author | Tushar Behera <tushar.behera@linaro.org> | 2014-05-09 07:07:40 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-06-03 03:11:41 -0400 |
commit | 3d2379909374ef2de6bc57ed8966c7ca8c9dfb82 (patch) | |
tree | 740783678dd09452d4090a8ec4f9d6f90af76329 | |
parent | d58603cc304b717707e8f8ff05bf6aff9d9c82b5 (diff) |
mfd: syscon: Include linux/err.h to fix build error
commit df73de9b0d412 ("mfd: syscon: Return -ENOSYS if CONFIG_MFD_SYSCON
is not enabled") introduced fallbacks for APIs, but missed out on adding
the header file. This would work only if linux/err.h is also included
in the source code from where this file is included. It would be better
to include linux/err.h in file to remove possible build errors.
Without this patch, we get following and similar build errors if this
header file is included in some source file and CONFIG_MFD_SYSCON is
not enabled.
include/linux/mfd/syscon.h: In function ‘syscon_node_to_regmap’:
include/linux/mfd/syscon.h:30:2: error: implicit declaration of function ‘ERR_PTR’ [-Werror=implicit-function-declaration]
return ERR_PTR(-ENOSYS);
^
include/linux/mfd/syscon.h:30:18: error: ‘ENOSYS’ undeclared (first use in this function)
return ERR_PTR(-ENOSYS);
^
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | include/linux/mfd/syscon.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mfd/syscon.h b/include/linux/mfd/syscon.h index 8789fa3c7fd9..75e543b78f53 100644 --- a/include/linux/mfd/syscon.h +++ b/include/linux/mfd/syscon.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #ifndef __LINUX_MFD_SYSCON_H__ | 15 | #ifndef __LINUX_MFD_SYSCON_H__ |
16 | #define __LINUX_MFD_SYSCON_H__ | 16 | #define __LINUX_MFD_SYSCON_H__ |
17 | 17 | ||
18 | #include <linux/err.h> | ||
19 | |||
18 | struct device_node; | 20 | struct device_node; |
19 | 21 | ||
20 | #ifdef CONFIG_MFD_SYSCON | 22 | #ifdef CONFIG_MFD_SYSCON |