diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2014-11-05 11:09:26 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:12:22 -0400 |
commit | 6049301229b184d15873f907a35d22eb473c38a0 (patch) | |
tree | 49ced67c74cf1e70433a2fe36282b785d3cdc1b5 /drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c | |
parent | 3501269d1cdb08b5b8e67d6742f606211816e827 (diff) |
gpu: nvgpu: remove platform device on exit
Add ->remove() for undoing the ->probe() and ->late_probe() in
gk20a_platform devices, and call it when gk20a is removed.
Bug 1476801
Change-Id: Ic9b29c0a7ea4a4cae7b5a0f66774bd799eb28434
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/594443
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c index d5b82fcc..ee176b8b 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c | |||
@@ -120,6 +120,15 @@ static int gk20a_generic_late_probe(struct platform_device *dev) | |||
120 | return 0; | 120 | return 0; |
121 | } | 121 | } |
122 | 122 | ||
123 | static int gk20a_generic_remove(struct platform_device *dev) | ||
124 | { | ||
125 | struct gk20a_platform *platform = gk20a_get_platform(dev); | ||
126 | |||
127 | tegra_pd_remove_sd(&platform->g->pd); | ||
128 | |||
129 | return 0; | ||
130 | } | ||
131 | |||
123 | struct gk20a_platform gk20a_generic_platform = { | 132 | struct gk20a_platform gk20a_generic_platform = { |
124 | .railgate = gk20a_generic_railgate, | 133 | .railgate = gk20a_generic_railgate, |
125 | .unrailgate = gk20a_generic_unrailgate, | 134 | .unrailgate = gk20a_generic_unrailgate, |
@@ -127,5 +136,6 @@ struct gk20a_platform gk20a_generic_platform = { | |||
127 | 136 | ||
128 | .probe = gk20a_generic_probe, | 137 | .probe = gk20a_generic_probe, |
129 | .late_probe = gk20a_generic_late_probe, | 138 | .late_probe = gk20a_generic_late_probe, |
139 | .remove = gk20a_generic_remove, | ||
130 | .default_big_page_size = SZ_128K, | 140 | .default_big_page_size = SZ_128K, |
131 | }; | 141 | }; |