diff options
author | Alex Waterman <alexw@nvidia.com> | 2018-01-05 14:14:35 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-01-10 07:05:20 -0500 |
commit | a30f3075544b5edd2144383459d2650a88b1cde7 (patch) | |
tree | 7e0b21d9fecf8562993b3371736aa07757683886 /drivers/gpu/nvgpu/common/enabled.c | |
parent | 98210aad81e2f89c2df2ed9b73ab9a96b4c85f41 (diff) |
gpu: nvgpu: Free enabled flags on driver unload
Make sure the enabled flags are freed before the driver unloads.
Bug 200369180
Change-Id: Ibac9ee61ca99bdfda03d76e393c7cd6cb6cc299a
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1632752
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/enabled.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/enabled.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/enabled.c b/drivers/gpu/nvgpu/common/enabled.c index 06cbbe34..cded36c8 100644 --- a/drivers/gpu/nvgpu/common/enabled.c +++ b/drivers/gpu/nvgpu/common/enabled.c | |||
@@ -40,6 +40,14 @@ int nvgpu_init_enabled_flags(struct gk20a *g) | |||
40 | return 0; | 40 | return 0; |
41 | } | 41 | } |
42 | 42 | ||
43 | /* | ||
44 | * Call this on driver shutdown! | ||
45 | */ | ||
46 | void nvgpu_free_enabled_flags(struct gk20a *g) | ||
47 | { | ||
48 | nvgpu_kfree(g, g->enabled_flags); | ||
49 | } | ||
50 | |||
43 | bool nvgpu_is_enabled(struct gk20a *g, int flag) | 51 | bool nvgpu_is_enabled(struct gk20a *g, int flag) |
44 | { | 52 | { |
45 | return test_bit(flag, g->enabled_flags); | 53 | return test_bit(flag, g->enabled_flags); |