diff options
| author | Kurt Borja <[email protected]> | 2025-01-16 00:27:05 +0000 |
|---|---|---|
| committer | Ilpo Järvinen <[email protected]> | 2025-01-16 15:26:26 +0000 |
| commit | cf3ea098dd3af415f079bc0b999055f213dd4a83 (patch) | |
| tree | 6213bfb098df346cfa70e6c46aa85256a45b4108 /drivers/platform/surface/surface_platform_profile.c | |
| parent | ACPI: platform_profile: Let drivers set drvdata to the class device (diff) | |
| download | kernel-cf3ea098dd3af415f079bc0b999055f213dd4a83.tar.gz kernel-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 <[email protected]>
Signed-off-by: Kurt Borja <[email protected]>
Reviewed-by: Mark Pearson <[email protected]>
Tested-by: Mark Pearson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
Diffstat (limited to 'drivers/platform/surface/surface_platform_profile.c')
| -rw-r--r-- | drivers/platform/surface/surface_platform_profile.c | 8 |
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) |
