summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c
index 6969a3a7..fbc93fc3 100644
--- a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c
@@ -25,7 +25,6 @@
25 25
26int gk20a_ctrl_dev_open(struct inode *inode, struct file *filp) 26int gk20a_ctrl_dev_open(struct inode *inode, struct file *filp)
27{ 27{
28 int err;
29 struct gk20a *g; 28 struct gk20a *g;
30 29
31 gk20a_dbg_fn(""); 30 gk20a_dbg_fn("");
@@ -35,22 +34,13 @@ int gk20a_ctrl_dev_open(struct inode *inode, struct file *filp)
35 34
36 filp->private_data = g->dev; 35 filp->private_data = g->dev;
37 36
38 err = gk20a_get_client(g);
39 if (err) {
40 gk20a_dbg_fn("fail to get channel!");
41 return err;
42 }
43
44 return 0; 37 return 0;
45} 38}
46 39
47int gk20a_ctrl_dev_release(struct inode *inode, struct file *filp) 40int gk20a_ctrl_dev_release(struct inode *inode, struct file *filp)
48{ 41{
49 struct platform_device *dev = filp->private_data;
50
51 gk20a_dbg_fn(""); 42 gk20a_dbg_fn("");
52 43
53 gk20a_put_client(get_gk20a(dev));
54 return 0; 44 return 0;
55} 45}
56 46
@@ -177,21 +167,15 @@ static int gk20a_ctrl_alloc_as(
177 } 167 }
178 fd_install(fd, file); 168 fd_install(fd, file);
179 169
180 err = gk20a_get_client(g);
181 if (err)
182 goto clean_up;
183
184 err = gk20a_as_alloc_share(&g->as, args->big_page_size, &as_share); 170 err = gk20a_as_alloc_share(&g->as, args->big_page_size, &as_share);
185 if (err) 171 if (err)
186 goto clean_up_client; 172 goto clean_up;
187 173
188 file->private_data = as_share; 174 file->private_data = as_share;
189 175
190 args->as_fd = fd; 176 args->as_fd = fd;
191 return 0; 177 return 0;
192 178
193clean_up_client:
194 gk20a_put_client(g);
195clean_up: 179clean_up:
196 put_unused_fd(fd); 180 put_unused_fd(fd);
197 return err; 181 return err;