platform/surface: surface_platform_profile: Use devm_platform_profile_register()
JIRA: https://issues.redhat.com/browse/RHEL-105420 Conflicts: RHEL was missing upstream fe0e04cf66a1 commit 24c54b19b4958c8bc390d78d1da3413eb0970b8a Author: Kurt Borja <kuurtb@gmail.com> Date: Wed Jan 15 19:27:08 2025 -0500 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> Assisted-by: Patchpal AI Signed-off-by: David Arcari <darcari@redhat.com>
This commit is contained in:
parent
4afc831c7b
commit
89f1924b3e
|
@ -177,16 +177,7 @@ static int surface_platform_profile_probe(struct ssam_device *sdev)
|
|||
set_bit(PLATFORM_PROFILE_BALANCED_PERFORMANCE, tpd->handler.choices);
|
||||
set_bit(PLATFORM_PROFILE_PERFORMANCE, tpd->handler.choices);
|
||||
|
||||
platform_profile_register(&tpd->handler, tpd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
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[] = {
|
||||
|
@ -197,7 +188,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",
|
||||
|
|
Loading…
Reference in New Issue