summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/intel/pmc/lnl.c
diff options
context:
space:
mode:
authorXi Pardee <xi.pardee@linux.intel.com>2025-02-08 01:56:10 +0300
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2025-02-10 14:14:48 +0300
commit45fa1a0d4d8759787bf62b49019952e2d56a66f9 (patch)
tree603bef92ee23142f0e282361e49a35277eabda8e /drivers/platform/x86/intel/pmc/lnl.c
parentac6bef0d54014cc010831ec86ac425f482a981ae (diff)
downloadlinux-45fa1a0d4d8759787bf62b49019952e2d56a66f9.tar.xz
platform/x86/intel/pmc: Remove simple init functions
Remove simple init functions to avoid duplicate code. Store init function performing architecture specific action in the corresponding pmc_dev_info structure. Replace init function with pmc_dev_info structure in X86_MATCH_VFM() of core.c. Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com> Link: https://lore.kernel.org/r/20250207225615.401235-5-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/intel/pmc/lnl.c')
-rw-r--r--drivers/platform/x86/intel/pmc/lnl.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/platform/x86/intel/pmc/lnl.c b/drivers/platform/x86/intel/pmc/lnl.c
index 1142e65225be..5a78807b9bc2 100644
--- a/drivers/platform/x86/intel/pmc/lnl.c
+++ b/drivers/platform/x86/intel/pmc/lnl.c
@@ -550,14 +550,15 @@ static int lnl_resume(struct pmc_dev *pmcdev)
return cnl_resume(pmcdev);
}
-static struct pmc_dev_info lnl_pmc_dev = {
+static int lnl_core_init(struct pmc_dev *pmcdev, struct pmc_dev_info *pmc_dev_info)
+{
+ lnl_d3_fixup();
+ return generic_core_init(pmcdev, pmc_dev_info);
+}
+
+struct pmc_dev_info lnl_pmc_dev = {
.map = &lnl_socm_reg_map,
.suspend = cnl_suspend,
.resume = lnl_resume,
+ .init = lnl_core_init,
};
-
-int lnl_core_init(struct pmc_dev *pmcdev)
-{
- lnl_d3_fixup();
- return generic_core_init(pmcdev, &lnl_pmc_dev);
-}