From 249c576f0f9d0556cb7473b8a437b30239afbd16 Mon Sep 17 00:00:00 2001 From: Kurt Borja Date: Wed, 15 Jan 2025 19:27:04 -0500 Subject: ACPI: platform_profile: Let drivers set drvdata to the class device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add *drvdata to platform_profile_register() signature and assign it to the class device. While at it, pass specific driver state as drvdata to replace uses of container_of() with dev_get_drvdata(). Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-3-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen --- include/linux/platform_profile.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h index 8a9b8754f9ac..1c8fdda51eaa 100644 --- a/include/linux/platform_profile.h +++ b/include/linux/platform_profile.h @@ -40,9 +40,9 @@ struct platform_profile_handler { enum platform_profile_option profile); }; -int platform_profile_register(struct platform_profile_handler *pprof); +int platform_profile_register(struct platform_profile_handler *pprof, void *drvdata); int platform_profile_remove(struct platform_profile_handler *pprof); -int devm_platform_profile_register(struct platform_profile_handler *pprof); +int devm_platform_profile_register(struct platform_profile_handler *pprof, void *drvdata); int platform_profile_cycle(void); void platform_profile_notify(struct platform_profile_handler *pprof); -- cgit v1.2.3