diff options
| author | Xi Pardee <xi.pardee@linux.intel.com> | 2025-02-07 14:56:10 -0800 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-02-10 13:14:48 +0200 |
| commit | 45fa1a0d4d8759787bf62b49019952e2d56a66f9 (patch) | |
| tree | 603bef92ee23142f0e282361e49a35277eabda8e /drivers/platform/x86/intel/pmc/mtl.c | |
| parent | ac6bef0d54014cc010831ec86ac425f482a981ae (diff) | |
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/mtl.c')
| -rw-r--r-- | drivers/platform/x86/intel/pmc/mtl.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/platform/x86/intel/pmc/mtl.c b/drivers/platform/x86/intel/pmc/mtl.c index 28ea8fe8a493..705b7e1b0b86 100644 --- a/drivers/platform/x86/intel/pmc/mtl.c +++ b/drivers/platform/x86/intel/pmc/mtl.c @@ -990,17 +990,18 @@ static int mtl_resume(struct pmc_dev *pmcdev) return cnl_resume(pmcdev); } -static struct pmc_dev_info mtl_pmc_dev = { +static int mtl_core_init(struct pmc_dev *pmcdev, struct pmc_dev_info *pmc_dev_info) +{ + mtl_d3_fixup(); + return generic_core_init(pmcdev, pmc_dev_info); +} + +struct pmc_dev_info mtl_pmc_dev = { .pci_func = 2, .dmu_guid = MTL_PMT_DMU_GUID, .regmap_list = mtl_pmc_info_list, .map = &mtl_socm_reg_map, .suspend = cnl_suspend, .resume = mtl_resume, + .init = mtl_core_init, }; - -int mtl_core_init(struct pmc_dev *pmcdev) -{ - mtl_d3_fixup(); - return generic_core_init(pmcdev, &mtl_pmc_dev); -} |