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
8#ifndef __PLATFORM_DATA_X86_SOC_H8#ifndef __PLATFORM_DATA_X86_SOC_H
9#define __PLATFORM_DATA_X86_SOC_H9#define __PLATFORM_DATA_X86_SOC_H
10 10
11#include <linux/types.h>
12
11#if IS_ENABLED(CONFIG_X86)13#if IS_ENABLED(CONFIG_X86)
12 14
15#include <linux/mod_devicetable.h>
16
13#include <asm/cpu_device_id.h>17#include <asm/cpu_device_id.h>
14#include <asm/intel-family.h>
15 18
16#define SOC_INTEL_IS_CPU(soc, type) \19#define SOC_INTEL_IS_CPU(soc, type) \
17static inline bool soc_intel_is_##soc(void) \20static inline bool soc_intel_is_##soc(void) \
@@ -34,6 +37,8 @@ SOC_INTEL_IS_CPU(apl, ATOM_GOLDMONT); · 16 unmodified lines
34SOC_INTEL_IS_CPU(glk, ATOM_GOLDMONT_PLUS);37SOC_INTEL_IS_CPU(glk, ATOM_GOLDMONT_PLUS);
35SOC_INTEL_IS_CPU(cml, KABYLAKE_L);38SOC_INTEL_IS_CPU(cml, KABYLAKE_L);
36 39
40#undef SOC_INTEL_IS_CPU
41
37#else /* IS_ENABLED(CONFIG_X86) */42#else /* IS_ENABLED(CONFIG_X86) */
38 43
39static inline bool soc_intel_is_byt(void)44static 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