linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors <lm-sensors@lm-sensors.org>
Cc: Pawel Moll <pawel.moll@arm.com>,
	Jean Delvare <khali@linux-fr.org>,
	linux-kernel@vger.kernel.org, Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 2/2] hwmon: (vexpress) Fix build error seen if CONFIG_OF_DEVICE is not set
Date: Mon, 31 Dec 2012 00:13:08 -0800	[thread overview]
Message-ID: <1356941588-25249-2-git-send-email-linux@roeck-us.net> (raw)
In-Reply-To: <1356941588-25249-1-git-send-email-linux@roeck-us.net>

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@roeck-us.net>
---
 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


  reply	other threads:[~2012-12-31  8:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-31  8:13 [PATCH 1/2] hwmon: (vexpress) Remove __devexit and __devexit_p Guenter Roeck
2012-12-31  8:13 ` Guenter Roeck [this message]
2013-01-21 15:19   ` [PATCH 2/2] hwmon: (vexpress) Fix build error seen if CONFIG_OF_DEVICE is not set Pawel Moll

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1356941588-25249-2-git-send-email-linux@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=pawel.moll@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).