Skip to contentSkip to conversation

regulator: Include err.h from consumer.h to fix build failure

PATCH Applied Guenter Roeck 2 participants 2 messages Oct 9, 2014 – Oct 13, 2014 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: Include err.h from consumer.h to fix build failure

sh:sh2007_defconfig fails to build with the following error:

In file included from include/linux/regulator/machine.h:18:0,

                 from arch/sh/boards/board-sh2007.c:10:

include/linux/regulator/consumer.h: In function 'regulator_get_optional':
include/linux/regulator/consumer.h:271:2:
error: implicit declaration of function 'ERR_PTR'
include/linux/err.h: At top level:
include/linux/err.h:23:35: error: conflicting types for 'ERR_PTR' include/linux/regulator/consumer.h:271:9:
note: previous implicit declaration of 'ERR_PTR' was here

Since consumer.h uses ERR_PTR, it should include err.h.

---
 include/linux/regulator/consumer.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/regulator/consumer.h +2 -0
index d347c80..f540b14 100644
@@ -35,6 +35,8 @@
 #ifndef __LINUX_REGULATOR_CONSUMER_H_
 #define __LINUX_REGULATOR_CONSUMER_H_
 
+#include <linux/err.h>
+
 struct device;
 struct notifier_block;
 struct regmap;
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Guenter Roeck

sh:sh2007_defconfig fails to build with the following error:

In file included from include/linux/regulator/machine.h:18:0,

                 from arch/sh/boards/board-sh2007.c:10:

Applied, thanks.