summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index ad1a940d..276e5c3e 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -150,7 +150,6 @@ static const struct file_operations gk20a_prof_ops = {
150 .unlocked_ioctl = gk20a_dbg_gpu_dev_ioctl, 150 .unlocked_ioctl = gk20a_dbg_gpu_dev_ioctl,
151 /* .mmap = gk20a_prof_gpu_dev_mmap,*/ 151 /* .mmap = gk20a_prof_gpu_dev_mmap,*/
152 /*int (*mmap) (struct file *, struct vm_area_struct *);*/ 152 /*int (*mmap) (struct file *, struct vm_area_struct *);*/
153 .compat_ioctl = gk20a_dbg_gpu_dev_ioctl,
154#ifdef CONFIG_COMPAT 153#ifdef CONFIG_COMPAT
155 .compat_ioctl = gk20a_dbg_gpu_dev_ioctl, 154 .compat_ioctl = gk20a_dbg_gpu_dev_ioctl,
156#endif 155#endif
@@ -206,11 +205,11 @@ static void kunmap_and_free_iopage(void **kvaddr, struct page **page)
206{ 205{
207 if (*kvaddr) { 206 if (*kvaddr) {
208 kunmap(*kvaddr); 207 kunmap(*kvaddr);
209 *kvaddr = 0; 208 *kvaddr = NULL;
210 } 209 }
211 if (*page) { 210 if (*page) {
212 __free_page(*page); 211 __free_page(*page);
213 *page = 0; 212 *page = NULL;
214 } 213 }
215} 214}
216 215
@@ -606,11 +605,11 @@ static void gk20a_remove_support(struct platform_device *dev)
606 605
607 if (g->regs) { 606 if (g->regs) {
608 iounmap(g->regs); 607 iounmap(g->regs);
609 g->regs = 0; 608 g->regs = NULL;
610 } 609 }
611 if (g->bar1) { 610 if (g->bar1) {
612 iounmap(g->bar1); 611 iounmap(g->bar1);
613 g->bar1 = 0; 612 g->bar1 = NULL;
614 } 613 }
615} 614}
616 615
@@ -1063,11 +1062,11 @@ struct channel_gk20a *gk20a_get_channel_from_file(int fd)
1063 struct channel_gk20a *ch; 1062 struct channel_gk20a *ch;
1064 struct file *f = fget(fd); 1063 struct file *f = fget(fd);
1065 if (!f) 1064 if (!f)
1066 return 0; 1065 return NULL;
1067 1066
1068 if (f->f_op != &gk20a_channel_ops) { 1067 if (f->f_op != &gk20a_channel_ops) {
1069 fput(f); 1068 fput(f);
1070 return 0; 1069 return NULL;
1071 } 1070 }
1072 1071
1073 ch = (struct channel_gk20a *)f->private_data; 1072 ch = (struct channel_gk20a *)f->private_data;
@@ -1119,7 +1118,7 @@ static void gk20a_pm_shutdown(struct platform_device *pdev)
1119} 1118}
1120 1119
1121#ifdef CONFIG_PM 1120#ifdef CONFIG_PM
1122const struct dev_pm_ops gk20a_pm_ops = { 1121static const struct dev_pm_ops gk20a_pm_ops = {
1123#if defined(CONFIG_PM_RUNTIME) && !defined(CONFIG_PM_GENERIC_DOMAINS) 1122#if defined(CONFIG_PM_RUNTIME) && !defined(CONFIG_PM_GENERIC_DOMAINS)
1124 .runtime_resume = gk20a_pm_enable_clk, 1123 .runtime_resume = gk20a_pm_enable_clk,
1125 .runtime_suspend = gk20a_pm_disable_clk, 1124 .runtime_suspend = gk20a_pm_disable_clk,
@@ -1261,7 +1260,7 @@ static int gk20a_pm_init(struct platform_device *dev)
1261 return err; 1260 return err;
1262} 1261}
1263 1262
1264int gk20a_secure_page_alloc(struct platform_device *pdev) 1263static int gk20a_secure_page_alloc(struct platform_device *pdev)
1265{ 1264{
1266 struct gk20a_platform *platform = platform_get_drvdata(pdev); 1265 struct gk20a_platform *platform = platform_get_drvdata(pdev);
1267 int err = 0; 1266 int err = 0;
@@ -1466,13 +1465,15 @@ static int __exit gk20a_remove(struct platform_device *dev)
1466 1465
1467 gk20a_user_deinit(dev); 1466 gk20a_user_deinit(dev);
1468 1467
1469 set_gk20a(dev, 0); 1468 set_gk20a(dev, NULL);
1470#ifdef CONFIG_DEBUG_FS 1469#ifdef CONFIG_DEBUG_FS
1471 debugfs_remove(g->debugfs_ltc_enabled); 1470 debugfs_remove(g->debugfs_ltc_enabled);
1472 debugfs_remove(g->debugfs_gr_idle_timeout_default); 1471 debugfs_remove(g->debugfs_gr_idle_timeout_default);
1473 debugfs_remove(g->debugfs_timeouts_enabled); 1472 debugfs_remove(g->debugfs_timeouts_enabled);
1474#endif 1473#endif
1475 1474
1475 gk20a_remove_sysfs(&dev->dev);
1476
1476 kfree(g); 1477 kfree(g);
1477 1478
1478#ifdef CONFIG_PM_RUNTIME 1479#ifdef CONFIG_PM_RUNTIME