]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
regulator: Include err.h from consumer.h to fix build failure
authorGuenter Roeck <linux@roeck-us.net>
Thu, 9 Oct 2014 19:43:27 +0000 (12:43 -0700)
committerMark Brown <broonie@kernel.org>
Mon, 13 Oct 2014 11:05:58 +0000 (13:05 +0200)
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.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/linux/regulator/consumer.h

index d347c805f923f8539b6430fa30119527edb7f244..f540b1496e2f798f63c4cc1db0803f12f3e6e732 100644 (file)
@@ -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;