aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/surface
diff options
context:
space:
mode:
authorKurt Borja <kuurtb@gmail.com>2025-01-15 19:27:05 -0500
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2025-01-16 17:26:26 +0200
commitcf3ea098dd3af415f079bc0b999055f213dd4a83 (patch)
tree6213bfb098df346cfa70e6c46aa85256a45b4108 /drivers/platform/surface
parentACPI: platform_profile: Let drivers set drvdata to the class device (diff)
downloadlinux-cf3ea098dd3af415f079bc0b999055f213dd4a83.tar.gz
linux-cf3ea098dd3af415f079bc0b999055f213dd4a83.zip
ACPI: platform_profile: Remove platform_profile_handler from callbacks
Devices can now set drvdata to the class device, thus passing the platform_profile_handler to callbacks is unnecessary. Instead pass the class device. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Kurt Borja <kuurtb@gmail.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Link: https://lore.kernel.org/r/20250116002721.75592-4-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform/surface')
-rw-r--r--drivers/platform/surface/surface_platform_profile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/platform/surface/surface_platform_profile.c b/drivers/platform/surface/surface_platform_profile.c
index edb9362003a4..26c1230e75df 100644
--- a/drivers/platform/surface/surface_platform_profile.c
+++ b/drivers/platform/surface/surface_platform_profile.c
@@ -154,14 +154,14 @@ static int convert_profile_to_ssam_fan(struct ssam_device *sdev, enum platform_p
}
}
-static int ssam_platform_profile_get(struct platform_profile_handler *pprof,
+static int ssam_platform_profile_get(struct device *dev,
enum platform_profile_option *profile)
{
struct ssam_platform_profile_device *tpd;
enum ssam_tmp_profile tp;
int status;
- tpd = dev_get_drvdata(&pprof->class_dev);
+ tpd = dev_get_drvdata(dev);
status = ssam_tmp_profile_get(tpd->sdev, &tp);
if (status)
@@ -175,13 +175,13 @@ static int ssam_platform_profile_get(struct platform_profile_handler *pprof,
return 0;
}
-static int ssam_platform_profile_set(struct platform_profile_handler *pprof,
+static int ssam_platform_profile_set(struct device *dev,
enum platform_profile_option profile)
{
struct ssam_platform_profile_device *tpd;
int tp;
- tpd = dev_get_drvdata(&pprof->class_dev);
+ tpd = dev_get_drvdata(dev);
tp = convert_profile_to_ssam_tmp(tpd->sdev, profile);
if (tp < 0)