From: Mario Limonciello Date: Fri, 6 Dec 2024 03:19:15 +0000 (-0600) Subject: ACPI: platform_profile: Notify class device from platform_profile_notify() X-Git-Tag: v6.14-rc1~117^2~77^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=37a6853d83f8af1b68346b555a7dd78e2c7f10e5;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Mark Pearson Reviewed-by: Ilpo Järvinen Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20241206031918.1537-20-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen --- diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c index a1fdc56537baf..e105ef48409ec 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);