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

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 <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lkml.kernel.org/r/20200320131509.967017771@linutronix.de

authored by

Thomas Gleixner and committed by
Borislav Petkov
9c51044c 5cfc7ac7

+4 -8
+1 -1
drivers/thermal/intel/intel_powerclamp.c
··· 651 651 }; 652 652 653 653 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), 655 655 {} 656 656 }; 657 657 MODULE_DEVICE_TABLE(x86cpu, intel_powerclamp_ids);
+1 -4
drivers/thermal/intel/intel_quark_dts_thermal.c
··· 64 64 #include <asm/cpu_device_id.h> 65 65 #include <asm/iosf_mbi.h> 66 66 67 - #define X86_FAMILY_QUARK 0x5 68 - #define X86_MODEL_QUARK_X1000 0x9 69 - 70 67 /* DTS reset is programmed via QRK_MBI_UNIT_SOC */ 71 68 #define QRK_DTS_REG_OFFSET_RESET 0x34 72 69 #define QRK_DTS_RESET_BIT BIT(0) ··· 430 433 } 431 434 432 435 static const struct x86_cpu_id qrk_thermal_ids[] __initconst = { 433 - { X86_VENDOR_INTEL, X86_FAMILY_QUARK, X86_MODEL_QUARK_X1000 }, 436 + X86_MATCH_VENDOR_FAM_MODEL(INTEL, 5, INTEL_FAM5_QUARK_X1000, NULL), 434 437 {} 435 438 }; 436 439 MODULE_DEVICE_TABLE(x86cpu, qrk_thermal_ids);
+1 -2
drivers/thermal/intel/intel_soc_dts_thermal.c
··· 36 36 } 37 37 38 38 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), 41 40 {} 42 41 }; 43 42 MODULE_DEVICE_TABLE(x86cpu, soc_thermal_ids);
+1 -1
drivers/thermal/intel/x86_pkg_temp_thermal.c
··· 478 478 } 479 479 480 480 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), 482 482 {} 483 483 }; 484 484 MODULE_DEVICE_TABLE(x86cpu, pkg_temp_thermal_ids);