Skip to content

Commit

Permalink
ACPI: platform_profile: Notify class device from platform_profile_not…
Browse files Browse the repository at this point in the history
…ify()

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>
  • Loading branch information
Mario Limonciello authored and Ilpo Järvinen committed Dec 10, 2024
1 parent 70246f8 commit 37a6853
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/acpi/platform_profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 37a6853

Please sign in to comment.