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

hwmon: (amd_energy) match for supported models

The energy counters of certain models seems to be reporting
inconsistent values. Hence, match for the supported models.

Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Fixes: 8abee9566b7e ("hwmon: Add amd_energy driver to report energy counters")
Link: https://lore.kernel.org/r/20200706171715.124993-1-nchatrad@amd.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Naveen Krishna Chatradhi and committed by
Guenter Roeck
f28e360f bc4071aa

+1 -1
+1 -1
drivers/hwmon/amd_energy.c
··· 362 362 static struct platform_device *amd_energy_platdev; 363 363 364 364 static const struct x86_cpu_id cpu_ids[] __initconst = { 365 - X86_MATCH_VENDOR_FAM(AMD, 0x17, NULL), 365 + X86_MATCH_VENDOR_FAM_MODEL(AMD, 0x17, 0x31, NULL), 366 366 {} 367 367 }; 368 368 MODULE_DEVICE_TABLE(x86cpu, cpu_ids);