[PATCH] lib: include <linux/io.h> for devmem_is_allowed definition

Ben Dooks posted 1 patch 3 years, 9 months ago
lib/devmem_is_allowed.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] lib: include <linux/io.h> for devmem_is_allowed definition
Posted by Ben Dooks 3 years, 9 months ago
The devmem_is_allowed() is defined in <asm/io.h> but this or <linux/io.h>
is not included in lib/devmem_is_allowed.c does not include it. Fix the
following sparse warning by including <linux/io.h>

lib/devmem_is_allowed.c:20:5: warning: symbol 'devmem_is_allowed' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben.dooks@sifive.com>
---
 lib/devmem_is_allowed.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/devmem_is_allowed.c b/lib/devmem_is_allowed.c
index 60be9e24bd57..9c060c69f134 100644
--- a/lib/devmem_is_allowed.c
+++ b/lib/devmem_is_allowed.c
@@ -10,6 +10,7 @@
 
 #include <linux/mm.h>
 #include <linux/ioport.h>
+#include <linux/io.h>
 
 /*
  * devmem_is_allowed() checks to see if /dev/mem access to a certain address
-- 
2.35.1