diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-03-13 09:15:42 -0400 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2018-03-17 20:15:26 -0400 |
commit | 202fbf4865e97b64ca2d94b7dc1a4efd6f7b0729 (patch) | |
tree | 0a01a81953a35598fa7324ba6602418d29249cc4 /drivers/of/unittest.c | |
parent | d4b9e425d23a2c38e2cc52f62c79773ccff0ecc4 (diff) |
of: unittest: move misplaced function declaration
The overlay_data_apply() declaration is outside of the #ifdef that contains
both the user and the definition, causing a compile-time warning in
some configurations:
drivers/of/unittest.c:48:19: error: 'overlay_data_apply' declared 'static' but never defined [-Werror=unused-function]
static int __init overlay_data_apply(const char *overlay_name, int *overlay_id);
This moves the declaration into the #ifdef section.
Fixes: 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/unittest.c')
-rw-r--r-- | drivers/of/unittest.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index df93149d6146..a08c9e2d5c4c 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c | |||
@@ -45,8 +45,6 @@ static struct unittest_results { | |||
45 | failed; \ | 45 | failed; \ |
46 | }) | 46 | }) |
47 | 47 | ||
48 | static int __init overlay_data_apply(const char *overlay_name, int *overlay_id); | ||
49 | |||
50 | static void __init of_unittest_find_node_by_name(void) | 48 | static void __init of_unittest_find_node_by_name(void) |
51 | { | 49 | { |
52 | struct device_node *np; | 50 | struct device_node *np; |
@@ -1192,6 +1190,7 @@ static int __init unittest_data_add(void) | |||
1192 | } | 1190 | } |
1193 | 1191 | ||
1194 | #ifdef CONFIG_OF_OVERLAY | 1192 | #ifdef CONFIG_OF_OVERLAY |
1193 | static int __init overlay_data_apply(const char *overlay_name, int *overlay_id); | ||
1195 | 1194 | ||
1196 | static int unittest_probe(struct platform_device *pdev) | 1195 | static int unittest_probe(struct platform_device *pdev) |
1197 | { | 1196 | { |