]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mfd: syscon: Include linux/err.h to fix build error
authorTushar Behera <tushar.behera@linaro.org>
Fri, 9 May 2014 11:07:40 +0000 (16:37 +0530)
committerLee Jones <lee.jones@linaro.org>
Fri, 23 May 2014 09:34:27 +0000 (10:34 +0100)
commitf5f90488ba5eeca049851106625ab2eb9cacbeaa
tree8bffa522b1aaac5cb0e613db07a3061b4484700f
parentf09c91b82cffa2d3d1b67b4a44c3276bb83abd4a
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>
include/linux/mfd/syscon.h