History

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.

Andy Shevchenko committed 3 years ago

Commit 67c7deb1 parent b9195401 file · +6 −1Browse files

Showing the changes to include/linux/platform_data (1 of 1 file). Show all

Unified · Split

include/linux/platform_data/x86/soc.h+6−1
@@ -8,10 +8,13 @@ · 7 unmodified lines
88 #ifndef __PLATFORM_DATA_X86_SOC_H
99 #define __PLATFORM_DATA_X86_SOC_H
1010
11+#include <linux/types.h>
12+
1113 #if IS_ENABLED(CONFIG_X86)
1214
15+#include <linux/mod_devicetable.h>
16+
1317 #include <asm/cpu_device_id.h>
14−#include <asm/intel-family.h>
1518
1619 #define SOC_INTEL_IS_CPU(soc, type) \
1720 static inline bool soc_intel_is_##soc(void) \
@@ -34,6 +37,8 @@ SOC_INTEL_IS_CPU(apl, ATOM_GOLDMONT); · 16 unmodified lines
3437 SOC_INTEL_IS_CPU(glk, ATOM_GOLDMONT_PLUS);
3538 SOC_INTEL_IS_CPU(cml, KABYLAKE_L);
3639
40+#undef SOC_INTEL_IS_CPU
41+
3742 #else /* IS_ENABLED(CONFIG_X86) */
3843
3944 static inline bool soc_intel_is_byt(void)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t