Re: [PATCH] mfd: syscon: Include linux/err.h to fix build error

From: Lee Jones
Date: Fri May 09 2014 - 07:15:24 EST


On Fri, 09 May 2014, Tushar Behera wrote:

> 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@xxxxxxxxxx>
> ---
> include/linux/mfd/syscon.h | 2 ++
> 1 file changed, 2 insertions(+)

Applied, thanks.

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/