public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] platform/x86: Fix header inclusion in linux/platform_data/x86/soc.h
@ 2023-02-06 14:52 Andy Shevchenko
  2023-02-10 16:15 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2023-02-06 14:52 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Hans de Goede, platform-driver-x86

First of all, we don't use intel-family.h directly. On the other hand
we actively use boolean type, that is defined in the types.h (we take
top-level header for that) and x86_cpu_id, that is provided in the
mod_devicetable.h.

Secondly, we don't need to spread SOC_INTEL_IS_CPU() macro to the users.
Hence, undefine it when it's appropriate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/platform_data/x86/soc.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/linux/platform_data/x86/soc.h b/include/linux/platform_data/x86/soc.h
index da05f425587a..a5705189e2ac 100644
--- a/include/linux/platform_data/x86/soc.h
+++ b/include/linux/platform_data/x86/soc.h
@@ -8,10 +8,13 @@
 #ifndef __PLATFORM_DATA_X86_SOC_H
 #define __PLATFORM_DATA_X86_SOC_H
 
+#include <linux/types.h>
+
 #if IS_ENABLED(CONFIG_X86)
 
+#include <linux/mod_devicetable.h>
+
 #include <asm/cpu_device_id.h>
-#include <asm/intel-family.h>
 
 #define SOC_INTEL_IS_CPU(soc, type)				\
 static inline bool soc_intel_is_##soc(void)			\
@@ -34,6 +37,8 @@ SOC_INTEL_IS_CPU(apl, ATOM_GOLDMONT);
 SOC_INTEL_IS_CPU(glk, ATOM_GOLDMONT_PLUS);
 SOC_INTEL_IS_CPU(cml, KABYLAKE_L);
 
+#undef SOC_INTEL_IS_CPU
+
 #else /* IS_ENABLED(CONFIG_X86) */
 
 static inline bool soc_intel_is_byt(void)
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-10 16:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-06 14:52 [PATCH v1 1/1] platform/x86: Fix header inclusion in linux/platform_data/x86/soc.h Andy Shevchenko
2023-02-10 16:15 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox