diff options
author | Kurt Borja <kuurtb@gmail.com> | 2025-01-15 19:27:08 -0500 |
---|---|---|
committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-01-16 17:26:31 +0200 |
commit | 24c54b19b4958c8bc390d78d1da3413eb0970b8a (patch) | |
tree | 92ef6a37362040c4b2a74aa2887e9112167fed0b | |
parent | 58d5629dc8b8b8d9928fc649d9f2aaa361a8a5c5 (diff) |
platform/surface: surface_platform_profile: Use devm_platform_profile_register()
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>
-rw-r--r-- | drivers/platform/surface/surface_platform_profile.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/platform/surface/surface_platform_profile.c b/drivers/platform/surface/surface_platform_profile.c index 48cfe9cb89c8..bbdc873cb788 100644 --- a/drivers/platform/surface/surface_platform_profile.c +++ b/drivers/platform/surface/surface_platform_profile.c @@ -234,15 +234,7 @@ static int surface_platform_profile_probe(struct ssam_device *sdev) tpd->has_fan = device_property_read_bool(&sdev->dev, "has_fan"); - return platform_profile_register(&tpd->handler, tpd); -} - -static void surface_platform_profile_remove(struct ssam_device *sdev) -{ - struct ssam_platform_profile_device *tpd; - - tpd = ssam_device_get_drvdata(sdev); - platform_profile_remove(&tpd->handler); + return devm_platform_profile_register(&tpd->handler, tpd); } static const struct ssam_device_id ssam_platform_profile_match[] = { @@ -253,7 +245,6 @@ MODULE_DEVICE_TABLE(ssam, ssam_platform_profile_match); static struct ssam_device_driver surface_platform_profile = { .probe = surface_platform_profile_probe, - .remove = surface_platform_profile_remove, .match_table = ssam_platform_profile_match, .driver = { .name = "surface_platform_profile", |