[PATCH 2/2] hwmon: (vexpress) Fix build error seen if CONFIG_OF_DEVICE is not set

From: Guenter Roeck
Date: Mon Dec 31 2012 - 03:13:18 EST


Fix:
vexpress.c: In function âvexpress_hwmon_name_showâ:
vexpress.c:34:2: error: implicit declaration of function
âof_get_propertyâ [-Werror=implicit-function-declaration]
vexpress.c:34:27: warning: initialization makes pointer from integer
without a cast [enabled by default]
vexpress.c: In function âvexpress_hwmon_label_showâ:
vexpress.c:43:22: warning: initialization makes pointer from integer
without a cast [enabled by default]

Seen if CONFIG_OF_DEVICE is not defined. of_get_property is declared in
of.h which is only included by of_device.h if CONFIG_OF_DEVICE is defined.
of.h needs to be included directly.

Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
---
drivers/hwmon/vexpress.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/hwmon/vexpress.c b/drivers/hwmon/vexpress.c
index 86d7f6d..d867e6b 100644
--- a/drivers/hwmon/vexpress.c
+++ b/drivers/hwmon/vexpress.c
@@ -19,6 +19,7 @@
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/vexpress.h>
--
1.7.9.7

--
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/