summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86
diff options
context:
space:
mode:
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>2023-12-12 07:16:58 +0530
committerHans de Goede <hdegoede@redhat.com>2023-12-18 12:47:46 +0100
commitc7af165372a8612eae08dbbab787d1d84d7f0384 (patch)
tree9add603f5b9f13d3ce3bd940b4d020fcd146e822 /drivers/platform/x86
parent7c45534afa4435c9fceeeb8ca33c0fdc269c2240 (diff)
downloadlinux-stable-c7af165372a8612eae08dbbab787d1d84d7f0384.tar.gz
linux-stable-c7af165372a8612eae08dbbab787d1d84d7f0384.tar.bz2
linux-stable-c7af165372a8612eae08dbbab787d1d84d7f0384.zip
platform/x86/amd/pmf: change amd_pmf_init_features() call sequence
To sideload pmf policy binaries, the Smart PC Solution Builder provides a debugfs file called "update_policy"; that gets created under a new debugfs directory called "pb" and this new directory has to be associated with existing parent directory for PMF driver called "amd_pmf". In the current code structure, amd_pmf_dbgfs_register() is called after amd_pmf_init_features(). This will not help when the Smart PC builder feature has to be assoicated to the parent directory. Hence change the order of amd_pmf_dbgfs_register() and call it before amd_pmf_init_features() so that when the Smart PC init happens, it has the parent debugfs directory to get itself hooked. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20231212014705.2017474-6-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r--drivers/platform/x86/amd/pmf/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c
index c10d40b33667..feaa09f5b35a 100644
--- a/drivers/platform/x86/amd/pmf/core.c
+++ b/drivers/platform/x86/amd/pmf/core.c
@@ -431,9 +431,9 @@ static int amd_pmf_probe(struct platform_device *pdev)
apmf_acpi_init(dev);
platform_set_drvdata(pdev, dev);
+ amd_pmf_dbgfs_register(dev);
amd_pmf_init_features(dev);
apmf_install_handler(dev);
- amd_pmf_dbgfs_register(dev);
dev_info(dev->dev, "registered PMF device successfully\n");