platform/x86: intel_pmc_core: Remove global struct pmc_dev
authorDavid E. Box <david.e.box@linux.intel.com>
Sat, 17 Apr 2021 03:12:45 +0000 (20:12 -0700)
committerHans de Goede <hdegoede@redhat.com>
Mon, 19 Apr 2021 08:41:24 +0000 (10:41 +0200)
commit7dc4dc563dd40c596f72aa4e8ba4d61c82ab73c5
tree645a8fa0d961e2a5bea698d6bfc609586877288b
parentc9f86d6ca6b5e23d30d16ade4b9fff5b922a610a
platform/x86: intel_pmc_core: Remove global struct pmc_dev

The intel_pmc_core driver did not always bind to a device which meant it
lacked a struct device that could be used to maintain driver data. So a
global instance of struct pmc_dev was used for this purpose and functions
accessed this directly. Since the driver now binds to an ACPI device,
remove the global pmc_dev in favor of one that is allocated during probe.
Modify users of the global to obtain the object by argument instead.

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-3-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel_pmc_core.c