Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

platform/x86: Fix header inclusion in linux/platform_data/x86/soc.h

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>
Link: https://lore.kernel.org/r/20230206145238.19460-1-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Andy Shevchenko and committed by
Hans de Goede
67c7debb b919540a

+6 -1
+6 -1
include/linux/platform_data/x86/soc.h
··· 8 8 #ifndef __PLATFORM_DATA_X86_SOC_H 9 9 #define __PLATFORM_DATA_X86_SOC_H 10 10 11 + #include <linux/types.h> 12 + 11 13 #if IS_ENABLED(CONFIG_X86) 12 14 15 + #include <linux/mod_devicetable.h> 16 + 13 17 #include <asm/cpu_device_id.h> 14 - #include <asm/intel-family.h> 15 18 16 19 #define SOC_INTEL_IS_CPU(soc, type) \ 17 20 static inline bool soc_intel_is_##soc(void) \ ··· 36 33 SOC_INTEL_IS_CPU(apl, ATOM_GOLDMONT); 37 34 SOC_INTEL_IS_CPU(glk, ATOM_GOLDMONT_PLUS); 38 35 SOC_INTEL_IS_CPU(cml, KABYLAKE_L); 36 + 37 + #undef SOC_INTEL_IS_CPU 39 38 40 39 #else /* IS_ENABLED(CONFIG_X86) */ 41 40