]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: intel_pmc_core: Don't use global pmcdev in quirks
authorDavid E. Box <david.e.box@linux.intel.com>
Sat, 17 Apr 2021 03:12:44 +0000 (20:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 May 2021 06:37:18 +0000 (08:37 +0200)
commit2bec84bc51f2d854b0374b8606d07aac8d7ad21e
tree3ec79793897fef7e0048f5232d806ca0b3c86dd5
parentc1c02d27e91b44f91d0d2279240f2a79ee9902ca
platform/x86: intel_pmc_core: Don't use global pmcdev in quirks

[ Upstream commit c9f86d6ca6b5e23d30d16ade4b9fff5b922a610a ]

The DMI callbacks, used for quirks, currently access the PMC by getting
the address a global pmc_dev struct. Instead, have the callbacks set a
global quirk specific variable. In probe, after calling dmi_check_system(),
pass pmc_dev to a function that will handle each quirk if its variable
condition is met. This allows removing the global pmc_dev later.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>
Link: https://lore.kernel.org/r/20210417031252.3020837-2-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/intel_pmc_core.c