Skip to content

Commit 08245ad

Browse files
committed
hwmon: (vexpress) Fix build error seen if CONFIG_OF_DEVICE is not set
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 <[email protected]>
1 parent 9931fac commit 08245ad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/hwmon/vexpress.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/hwmon.h>
2020
#include <linux/hwmon-sysfs.h>
2121
#include <linux/module.h>
22+
#include <linux/of.h>
2223
#include <linux/of_device.h>
2324
#include <linux/platform_device.h>
2425
#include <linux/vexpress.h>

0 commit comments

Comments
 (0)