diff options
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/scale.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/scale.c b/drivers/gpu/nvgpu/os/linux/scale.c index d7a961c7..ee5b6861 100644 --- a/drivers/gpu/nvgpu/os/linux/scale.c +++ b/drivers/gpu/nvgpu/os/linux/scale.c | |||
@@ -368,11 +368,11 @@ void gk20a_scale_init(struct device *dev) | |||
368 | profile->devfreq_profile.get_cur_freq = get_cur_freq; | 368 | profile->devfreq_profile.get_cur_freq = get_cur_freq; |
369 | profile->devfreq_profile.polling_ms = 25; | 369 | profile->devfreq_profile.polling_ms = 25; |
370 | 370 | ||
371 | devfreq = devfreq_add_device(dev, | 371 | devfreq = devm_devfreq_add_device(dev, |
372 | &profile->devfreq_profile, | 372 | &profile->devfreq_profile, |
373 | platform->devfreq_governor, NULL); | 373 | platform->devfreq_governor, NULL); |
374 | 374 | ||
375 | if (IS_ERR(devfreq)) | 375 | if (IS_ERR_OR_NULL(devfreq)) |
376 | devfreq = NULL; | 376 | devfreq = NULL; |
377 | 377 | ||
378 | l->devfreq = devfreq; | 378 | l->devfreq = devfreq; |
@@ -401,8 +401,6 @@ void gk20a_scale_exit(struct device *dev) | |||
401 | { | 401 | { |
402 | struct gk20a_platform *platform = dev_get_drvdata(dev); | 402 | struct gk20a_platform *platform = dev_get_drvdata(dev); |
403 | struct gk20a *g = platform->g; | 403 | struct gk20a *g = platform->g; |
404 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); | ||
405 | int err; | ||
406 | 404 | ||
407 | #ifdef CONFIG_GK20A_PM_QOS | 405 | #ifdef CONFIG_GK20A_PM_QOS |
408 | if (platform->qos_notify) { | 406 | if (platform->qos_notify) { |
@@ -413,11 +411,6 @@ void gk20a_scale_exit(struct device *dev) | |||
413 | } | 411 | } |
414 | #endif | 412 | #endif |
415 | 413 | ||
416 | if (platform->devfreq_governor) { | ||
417 | err = devfreq_remove_device(l->devfreq); | ||
418 | l->devfreq = NULL; | ||
419 | } | ||
420 | |||
421 | nvgpu_kfree(g, g->scale_profile); | 414 | nvgpu_kfree(g, g->scale_profile); |
422 | g->scale_profile = NULL; | 415 | g->scale_profile = NULL; |
423 | } | 416 | } |