From 6049301229b184d15873f907a35d22eb473c38a0 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Wed, 5 Nov 2014 18:09:26 +0200 Subject: 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 Reviewed-on: http://git-master/r/594443 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index ab9dd037..3d887d85 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -1478,6 +1478,9 @@ static int __exit gk20a_remove(struct platform_device *dev) else gk20a_pm_disable_clk(&dev->dev); + if (platform->remove) + platform->remove(dev); + set_gk20a(dev, NULL); kfree(g); -- cgit v1.2.2