Skip to content

Commit ad36c0c

Browse files
committed
platform/surface: surface_platform_profile: Use devm_platform_profile_register()
JIRA: https://issues.redhat.com/browse/RHEL-89362 commit 24c54b1 Author: Kurt Borja <kuurtb@gmail.com> Date: Wed Jan 15 19:27:08 2025 -0500 Replace platform_profile_register() with it's device managed version. 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-7-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
1 parent 87b674b commit ad36c0c

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

drivers/platform/surface/surface_platform_profile.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,7 @@ static int surface_platform_profile_probe(struct ssam_device *sdev)
234234

235235
tpd->has_fan = device_property_read_bool(&sdev->dev, "has_fan");
236236

237-
return platform_profile_register(&tpd->handler, tpd);
238-
}
239-
240-
static void surface_platform_profile_remove(struct ssam_device *sdev)
241-
{
242-
struct ssam_platform_profile_device *tpd;
243-
244-
tpd = ssam_device_get_drvdata(sdev);
245-
platform_profile_remove(&tpd->handler);
237+
return devm_platform_profile_register(&tpd->handler, tpd);
246238
}
247239

248240
static const struct ssam_device_id ssam_platform_profile_match[] = {
@@ -253,7 +245,6 @@ MODULE_DEVICE_TABLE(ssam, ssam_platform_profile_match);
253245

254246
static struct ssam_device_driver surface_platform_profile = {
255247
.probe = surface_platform_profile_probe,
256-
.remove = surface_platform_profile_remove,
257248
.match_table = ssam_platform_profile_match,
258249
.driver = {
259250
.name = "surface_platform_profile",

0 commit comments

Comments
 (0)