Skip to content

Commit 3d23799

Browse files
trbeheraLee Jones
authored andcommitted
mfd: syscon: Include linux/err.h to fix build error
commit df73de9 ("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>
1 parent d58603c commit 3d23799

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎include/linux/mfd/syscon.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#ifndef __LINUX_MFD_SYSCON_H__
1616
#define __LINUX_MFD_SYSCON_H__
1717

18+
#include <linux/err.h>
19+
1820
struct device_node;
1921

2022
#ifdef CONFIG_MFD_SYSCON

0 commit comments

Comments
 (0)