PM / OPP: Introduce function to free cpufreq table
cpufreq table allocated by opp_init_cpufreq_table is better freed by OPP layer itself. This allows future modifications to the table handling to be transparent to the users. Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
3110df800c
commit
99f381d354
@@ -625,4 +625,21 @@ int opp_init_cpufreq_table(struct device *dev,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* opp_free_cpufreq_table() - free the cpufreq table
|
||||
* @dev: device for which we do this operation
|
||||
* @table: table to free
|
||||
*
|
||||
* Free up the table allocated by opp_init_cpufreq_table
|
||||
*/
|
||||
void opp_free_cpufreq_table(struct device *dev,
|
||||
struct cpufreq_frequency_table **table)
|
||||
{
|
||||
if (!table)
|
||||
return;
|
||||
|
||||
kfree(*table);
|
||||
*table = NULL;
|
||||
}
|
||||
#endif /* CONFIG_CPU_FREQ */
|
||||
|
Reference in New Issue
Block a user