[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1418059449-15108-1-git-send-email-tsunghan.tw@gmail.com>
Date: Tue, 9 Dec 2014 01:24:09 +0800
From: Tsung-Han Lin <tsunghan.tw@...il.com>
To: gregkh@...uxfoundation.org
Cc: grant.likely@...aro.org, robh+dt@...nel.org,
horms+renesas@...ge.net.au, damm+renesas@...nsource.se,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Subject: [PATCH] staging:board: fix build errors and warnings
Add dummy implementation of 'of_find_all_nodes',
and remove the unnecessary 'of_can_translate_address',
which is already removed in commit
d9c6866be8a145e32da616d8dcbae806032d75b5 ("of: kill off
of_can_translate_address"), to fix the build errors and warnings
found by sparse.
Signed-off-by: Tsung-Han Lin <tsunghan.tw@...il.com>
---
drivers/staging/board/board.c | 3 +--
include/linux/of.h | 5 +++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/board/board.c b/drivers/staging/board/board.c
index 6050fbdfd31f..d5a6abc84519 100644
--- a/drivers/staging/board/board.c
+++ b/drivers/staging/board/board.c
@@ -11,8 +11,7 @@ static bool find_by_address(u64 base_address)
struct resource res;
while (dn) {
- if (of_can_translate_address(dn)
- && !of_address_to_resource(dn, 0, &res)) {
+ if (!of_address_to_resource(dn, 0, &res)) {
if (res.start == base_address) {
of_node_put(dn);
return true;
diff --git a/include/linux/of.h b/include/linux/of.h
index dfde07e77a63..c2c5021c1ee4 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -616,6 +616,11 @@ static inline const char *of_prop_next_string(struct property *prop,
return NULL;
}
+static inline struct device_node *of_find_all_nodes(struct device_node *prev)
+{
+ return NULL;
+}
+
#define of_match_ptr(_ptr) NULL
#define of_match_node(_matches, _node) NULL
#endif /* CONFIG_OF */
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists