summaryrefslogtreecommitdiff
path: root/drivers/platform/surface/surface_platform_profile.c
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2024-12-05 21:19:00 -0600
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2024-12-10 19:17:51 +0200
commit9b3bb37b44a317626464e79da8b39989b421963f (patch)
tree9a5cec8137d0b1b25484eeb4150be325cff106bf /drivers/platform/surface/surface_platform_profile.c
parent6f5e63ddc333dae371be6f8a8f70a82043697a4c (diff)
downloadlwn-9b3bb37b44a317626464e79da8b39989b421963f.tar.gz
lwn-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 <mpearson-lenovo@squebb.ca> Tested-by: Matthew Schwartz <matthew.schwartz@linux.dev> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-5-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
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[] = {