Skip to contentSkip to conversation

mfd: syscon: include errno.h from header

PATCH Applied Arnd Bergmann 2 participants 2 messages Mar 23, 2016 – Mar 24, 2016 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: syscon: include errno.h from header

The syscon header uses the ENOTSUPP error constant, but doesn't include the header that defines it. This causes a build error after the imx pinctrl driver started using syscon:

include/linux/mfd/syscon.h: In function 'syscon_node_to_regmap':
include/linux/mfd/syscon.h:32:18: error: 'ENOTSUPP' undeclared (first use in this function)

  return ERR_PTR(-ENOTSUPP);
                  ^~~~~~~~

This adds the missing #include.

Fixes 8626ada871f1 ("pinctrl: imx: attach iomuxc device to gpr syscon")
---
 include/linux/mfd/syscon.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/mfd/syscon.h +1 -0
index 1088149be0c9..40a76b97b7ab 100644
@@ -16,6 +16,7 @@
 #define __LINUX_MFD_SYSCON_H__
 
 #include <linux/err.h>
+#include <linux/errno.h>
 
 struct device_node;
 
Signature · 1 line
2.7.0
Applied
#1 lore raw
Quoted 9 lines · Arnd Bergmann

The syscon header uses the ENOTSUPP error constant, but doesn't include the header that defines it. This causes a build error after the imx pinctrl driver started using syscon:

include/linux/mfd/syscon.h: In function 'syscon_node_to_regmap':
include/linux/mfd/syscon.h:32:18: error: 'ENOTSUPP' undeclared (first use in this function)

  return ERR_PTR(-ENOTSUPP);
                  ^~~~~~~~
Quoted 7 lines

This adds the missing #include.

Fixes 8626ada871f1 ("pinctrl: imx: attach iomuxc device to gpr syscon")
---
 include/linux/mfd/syscon.h | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks.

Quoted 12 lines
include/linux/mfd/syscon.h +1 -0
index 1088149be0c9..40a76b97b7ab 100644
@@ -16,6 +16,7 @@
 #define __LINUX_MFD_SYSCON_H__
 
 #include <linux/err.h>
+#include <linux/errno.h>
 
 struct device_node;
 
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog