aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/surface/surface_platform_profile.c
diff options
context:
space:
mode:
authorMario Limonciello <[email protected]>2024-12-06 03:19:00 +0000
committerIlpo Järvinen <[email protected]>2024-12-10 17:17:51 +0000
commit9b3bb37b44a317626464e79da8b39989b421963f (patch)
tree9a5cec8137d0b1b25484eeb4150be325cff106bf /drivers/platform/surface/surface_platform_profile.c
parentACPI: platform_profile: Add device pointer into platform profile handler (diff)
downloadkernel-9b3bb37b44a317626464e79da8b39989b421963f.tar.gz
kernel-9b3bb37b44a317626464e79da8b39989b421963f.zip
ACPI: platform_profile: Add platform handler argument to platform_profile_remove()
To allow registering and unregistering multiple platform handlers calls to platform_profile_remove() will need to know which handler is to be removed. Add an argument for this. Tested-by: Mark Pearson <[email protected]> Tested-by: Matthew Schwartz <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Mark Pearson <[email protected]> Reviewed-by: Maximilian Luz <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Reviewed-by: Armin Wolf <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Link: https://lore.kernel.org/r/[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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/platform/surface/surface_platform_profile.c b/drivers/platform/surface/surface_platform_profile.c
index b73cfdd920c6..6c87e982bfc8 100644
--- a/drivers/platform/surface/surface_platform_profile.c
+++ b/drivers/platform/surface/surface_platform_profile.c
@@ -210,6 +210,7 @@ static int surface_platform_profile_probe(struct ssam_device *sdev)
return -ENOMEM;
tpd->sdev = sdev;
+ ssam_device_set_drvdata(sdev, tpd);
tpd->handler.name = "Surface Platform Profile";
tpd->handler.dev = &sdev->dev;
@@ -228,7 +229,10 @@ static int surface_platform_profile_probe(struct ssam_device *sdev)
static void surface_platform_profile_remove(struct ssam_device *sdev)
{
- platform_profile_remove();
+ struct ssam_platform_profile_device *tpd;
+
+ tpd = ssam_device_get_drvdata(sdev);
+ platform_profile_remove(&tpd->handler);
}
static const struct ssam_device_id ssam_platform_profile_match[] = {