mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
nvgpu: more changes to clean loading/unloading
Bug 200487652 Change-Id: Ib52cc6a85a19ea0396c8ab584c5ce9970f93085a Signed-off-by: Dmitry Pervushin <dpervushin@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2020386 (cherry picked from commit 617dff478c3687a08ed5b77f4ac2073b290c57ea) Reviewed-on: https://git-master.nvidia.com/r/2035720 GVS: Gerrit_Virtual_Submit Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
7c8d212b50
commit
4269d56d02
@@ -368,11 +368,11 @@ void gk20a_scale_init(struct device *dev)
|
||||
profile->devfreq_profile.get_cur_freq = get_cur_freq;
|
||||
profile->devfreq_profile.polling_ms = 25;
|
||||
|
||||
devfreq = devfreq_add_device(dev,
|
||||
devfreq = devm_devfreq_add_device(dev,
|
||||
&profile->devfreq_profile,
|
||||
platform->devfreq_governor, NULL);
|
||||
|
||||
if (IS_ERR(devfreq))
|
||||
if (IS_ERR_OR_NULL(devfreq))
|
||||
devfreq = NULL;
|
||||
|
||||
l->devfreq = devfreq;
|
||||
@@ -401,8 +401,6 @@ void gk20a_scale_exit(struct device *dev)
|
||||
{
|
||||
struct gk20a_platform *platform = dev_get_drvdata(dev);
|
||||
struct gk20a *g = platform->g;
|
||||
struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
|
||||
int err;
|
||||
|
||||
#ifdef CONFIG_GK20A_PM_QOS
|
||||
if (platform->qos_notify) {
|
||||
@@ -413,11 +411,6 @@ void gk20a_scale_exit(struct device *dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (platform->devfreq_governor) {
|
||||
err = devfreq_remove_device(l->devfreq);
|
||||
l->devfreq = NULL;
|
||||
}
|
||||
|
||||
nvgpu_kfree(g, g->scale_profile);
|
||||
g->scale_profile = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user