[PATCH 1/1] board: Fixed compilation of board.c
Artur Lorincz
larturus at yahoo.com
Wed Mar 22 14:03:20 UTC 2017
Implementing the find_by_address(...) function differently based on
the CONFIG_OF switch. The function of_find_all_nodes() invoked in the
function body is only available in case the CONFIG_OF switch is set.
For the other architectures the find_by_address(...) call returns false.
Signed-off-by: Artur Lorincz <larturus at yahoo.com>
---
drivers/staging/board/board.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/staging/board/board.c b/drivers/staging/board/board.c
index 86dc411..d383857 100644
--- a/drivers/staging/board/board.c
+++ b/drivers/staging/board/board.c
@@ -25,6 +25,7 @@
static struct device_node *irqc_node __initdata;
static unsigned int irqc_base __initdata;
+#ifdef CONFIG_OF
static bool find_by_address(u64 base_address)
{
struct device_node *dn = of_find_all_nodes(NULL);
@@ -42,6 +43,12 @@ static bool find_by_address(u64 base_address)
return false;
}
+#else
+static bool find_by_address(u64 base_address)
+{
+ return false;
+}
+#endif
bool __init board_staging_dt_node_available(const struct resource *resource,
unsigned int num_resources)
--
1.9.1
More information about the devel
mailing list