summaryrefslogtreecommitdiff
path: root/drivers/acpi/platform_profile.c
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2024-12-05 21:19:15 -0600
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2024-12-10 19:18:16 +0200
commit37a6853d83f8af1b68346b555a7dd78e2c7f10e5 (patch)
tree243209ec1865616a5c02966bcedda4736180d4b6 /drivers/acpi/platform_profile.c
parent70246f89c55fb1be0367a584000fd68502a0933f (diff)
ACPI: platform_profile: Notify class device from platform_profile_notify()
When a driver has called platform_profile_notify() both the legacy sysfs interface and the class device should be notified as userspace may listen to either. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-20-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/acpi/platform_profile.c')
-rw-r--r--drivers/acpi/platform_profile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
index a1fdc56537ba..e105ef48409e 100644
--- a/drivers/acpi/platform_profile.c
+++ b/drivers/acpi/platform_profile.c
@@ -412,6 +412,9 @@ void platform_profile_notify(struct platform_profile_handler *pprof)
{
if (!cur_profile)
return;
+ scoped_cond_guard(mutex_intr, return, &profile_lock) {
+ _notify_class_profile(pprof->class_dev, NULL);
+ }
sysfs_notify(acpi_kobj, NULL, "platform_profile");
}
EXPORT_SYMBOL_GPL(platform_profile_notify);