Skip to content

Commit 9c51044

Browse files
KAGA-KOKOsuryasaimadhu
authored andcommitted
thermal: Convert to new X86 CPU match macros
The new macro set has a consistent namespace and uses C99 initializers instead of the grufty C89 ones. Get rid the of the local QUARK defines and use the proper ones. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 5cfc7ac commit 9c51044

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

drivers/thermal/intel/intel_powerclamp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ static struct thermal_cooling_device_ops powerclamp_cooling_ops = {
651651
};
652652

653653
static const struct x86_cpu_id __initconst intel_powerclamp_ids[] = {
654-
{ X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_MWAIT },
654+
X86_MATCH_VENDOR_FEATURE(INTEL, X86_FEATURE_MWAIT, NULL),
655655
{}
656656
};
657657
MODULE_DEVICE_TABLE(x86cpu, intel_powerclamp_ids);

drivers/thermal/intel/intel_quark_dts_thermal.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@
6464
#include <asm/cpu_device_id.h>
6565
#include <asm/iosf_mbi.h>
6666

67-
#define X86_FAMILY_QUARK 0x5
68-
#define X86_MODEL_QUARK_X1000 0x9
69-
7067
/* DTS reset is programmed via QRK_MBI_UNIT_SOC */
7168
#define QRK_DTS_REG_OFFSET_RESET 0x34
7269
#define QRK_DTS_RESET_BIT BIT(0)
@@ -433,7 +430,7 @@ static struct soc_sensor_entry *alloc_soc_dts(void)
433430
}
434431

435432
static const struct x86_cpu_id qrk_thermal_ids[] __initconst = {
436-
{ X86_VENDOR_INTEL, X86_FAMILY_QUARK, X86_MODEL_QUARK_X1000 },
433+
X86_MATCH_VENDOR_FAM_MODEL(INTEL, 5, INTEL_FAM5_QUARK_X1000, NULL),
437434
{}
438435
};
439436
MODULE_DEVICE_TABLE(x86cpu, qrk_thermal_ids);

drivers/thermal/intel/intel_soc_dts_thermal.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ static irqreturn_t soc_irq_thread_fn(int irq, void *dev_data)
3636
}
3737

3838
static const struct x86_cpu_id soc_thermal_ids[] = {
39-
{ X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT, 0,
40-
BYT_SOC_DTS_APIC_IRQ},
39+
X86_MATCH_INTEL_FAM6_MODEL(ATOM_SILVERMONT, BYT_SOC_DTS_APIC_IRQ),
4140
{}
4241
};
4342
MODULE_DEVICE_TABLE(x86cpu, soc_thermal_ids);

drivers/thermal/intel/x86_pkg_temp_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ static int pkg_thermal_cpu_online(unsigned int cpu)
478478
}
479479

480480
static const struct x86_cpu_id __initconst pkg_temp_thermal_ids[] = {
481-
{ X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_PTS },
481+
X86_MATCH_VENDOR_FEATURE(INTEL, X86_FEATURE_PTS, NULL),
482482
{}
483483
};
484484
MODULE_DEVICE_TABLE(x86cpu, pkg_temp_thermal_ids);

0 commit comments

Comments
 (0)