Skip to content

Commit 5cfc7ac

Browse files
KAGA-KOKOsuryasaimadhu
authored andcommitted
hwmon: 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. 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 a69b3b1 commit 5cfc7ac

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

drivers/hwmon/coretemp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ static int coretemp_cpu_offline(unsigned int cpu)
709709
return 0;
710710
}
711711
static const struct x86_cpu_id __initconst coretemp_ids[] = {
712-
{ X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_DTHERM },
712+
X86_MATCH_VENDOR_FEATURE(INTEL, X86_FEATURE_DTHERM, NULL),
713713
{}
714714
};
715715
MODULE_DEVICE_TABLE(x86cpu, coretemp_ids);

drivers/hwmon/via-cputemp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,10 @@ static int via_cputemp_down_prep(unsigned int cpu)
270270
}
271271

272272
static const struct x86_cpu_id __initconst cputemp_ids[] = {
273-
{ X86_VENDOR_CENTAUR, 6, 0xa, }, /* C7 A */
274-
{ X86_VENDOR_CENTAUR, 6, 0xd, }, /* C7 D */
275-
{ X86_VENDOR_CENTAUR, 6, 0xf, }, /* Nano */
276-
{ X86_VENDOR_CENTAUR, 7, X86_MODEL_ANY, },
273+
X86_MATCH_VENDOR_FAM_MODEL(CENTAUR, 6, X86_CENTAUR_FAM6_C7_A, NULL),
274+
X86_MATCH_VENDOR_FAM_MODEL(CENTAUR, 6, X86_CENTAUR_FAM6_C7_D, NULL),
275+
X86_MATCH_VENDOR_FAM_MODEL(CENTAUR, 6, X86_CENTAUR_FAM6_NANO, NULL),
276+
X86_MATCH_VENDOR_FAM_MODEL(CENTAUR, 7, X86_MODEL_ANY, NULL),
277277
{}
278278
};
279279
MODULE_DEVICE_TABLE(x86cpu, cputemp_ids);

0 commit comments

Comments
 (0)