From: Alan Cox on
Various x86 drivers for embedded stuff will need to know the platform they
are running on to do runtime setup. Having them all grovelling around at
boot_params.hdr.hardware_subarch seems a bad idea, so export it as an
inline function that hides all the details of how the value arrives.

Signed-off-by: Alan Cox <alan(a)linux.intel.com>
---

arch/x86/include/asm/setup.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)


diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index 86b1506..4008446 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -60,6 +60,12 @@ static inline void x86_mrst_early_setup(void) { }
*/
extern struct boot_params boot_params;

+/* Isolate the internal knowledge from the generic callers */
+extern __inline int x86_platform_type(void)
+{
+ return boot_params.hdr.hardware_subarch;
+}
+
/*
* Do NOT EVER look at the BIOS memory size location.
* It does not work on many machines.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/