powerpc/pseries: Make plpar_wrappers.h safe to include when PSERIES=n
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 8 Mar 2018 02:54:40 +0000 (13:54 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 13 Mar 2018 12:43:04 +0000 (23:43 +1100)
Currently plpar_wrappers.h is not safe to include when
CONFIG_PPC_PSERIES=n, or at least it can be depending on other config
options and so on.

Fix that by wrapping the entire content in an ifdef.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/plpar_wrappers.h

index 1776af9e01187a3392388703eda2cc079ad786fe..09cb26816b2dcb30504a07147677842fef9627b7 100644 (file)
@@ -2,6 +2,8 @@
 #ifndef _ASM_POWERPC_PLPAR_WRAPPERS_H
 #define _ASM_POWERPC_PLPAR_WRAPPERS_H
 
+#ifdef CONFIG_PPC_PSERIES
+
 #include <linux/string.h>
 #include <linux/irqflags.h>
 
@@ -332,4 +334,6 @@ static inline long plpar_get_cpu_characteristics(struct h_cpu_char_result *p)
        return rc;
 }
 
+#endif /* CONFIG_PPC_PSERIES */
+
 #endif /* _ASM_POWERPC_PLPAR_WRAPPERS_H */