Skip to content

Commit

Permalink
platform/x86: thinkpad_acpi: Use devm_platform_profile_register()
Browse files Browse the repository at this point in the history
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-15-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
  • Loading branch information
Kurt Borja authored and Ilpo Järvinen committed Jan 17, 2025
1 parent c72ca29 commit 31658c9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/platform/x86/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -10650,7 +10650,7 @@ static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm)

dytc_profile.dev = &tpacpi_pdev->dev;
/* Create platform_profile structure and register */
err = platform_profile_register(&dytc_profile, NULL);
err = devm_platform_profile_register(&dytc_profile, NULL);
/*
* If for some reason platform_profiles aren't enabled
* don't quit terminally.
Expand All @@ -10668,14 +10668,8 @@ static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm)
return 0;
}

static void dytc_profile_exit(void)
{
platform_profile_remove(&dytc_profile);
}

static struct ibm_struct dytc_profile_driver_data = {
.name = "dytc-profile",
.exit = dytc_profile_exit,
};

/*************************************************************************
Expand Down

0 comments on commit 31658c9

Please sign in to comment.