aboutsummaryrefslogtreecommitdiff
path: root/include/asm-s390/chpid.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-s390/chpid.h')
-rw-r--r--include/asm-s390/chpid.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asm-s390/chpid.h b/include/asm-s390/chpid.h
index b203336fd89..dfe3c7f3439 100644
--- a/include/asm-s390/chpid.h
+++ b/include/asm-s390/chpid.h
@@ -10,7 +10,6 @@
#include <linux/string.h>
#include <asm/types.h>
-#include <asm/cio.h>
#define __MAX_CHPID 255
@@ -21,6 +20,9 @@ struct chp_id {
u8 id;
} __attribute__((packed));
+#ifdef __KERNEL__
+#include <asm/cio.h>
+
static inline void chp_id_init(struct chp_id *chpid)
{
memset(chpid, 0, sizeof(struct chp_id));
@@ -49,5 +51,6 @@ static inline int chp_id_is_valid(struct chp_id *chpid)
#define chp_id_for_each(c) \
for (chp_id_init(c); chp_id_is_valid(c); chp_id_next(c))
+#endif /* __KERNEL */
#endif /* _ASM_S390_CHPID_H */