diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-28 12:52:22 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 22:20:08 -0400 |
commit | 2903ff019b346ab8d36ebbf54853c3aaf6590608 (patch) | |
tree | 962d94054765bb37bc00e977c3036e65c5fd91fe /drivers/video/msm | |
parent | a5b470ba06aa3f96999ede5feba178df6bdb134a (diff) |
switch simple cases of fget_light to fdget
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/video/msm')
-rw-r--r-- | drivers/video/msm/mdp.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/video/msm/mdp.c b/drivers/video/msm/mdp.c index cb2ddf164c98..07c9d8ab2c3b 100644 --- a/drivers/video/msm/mdp.c +++ b/drivers/video/msm/mdp.c | |||
@@ -257,19 +257,17 @@ int get_img(struct mdp_img *img, struct fb_info *info, | |||
257 | unsigned long *start, unsigned long *len, | 257 | unsigned long *start, unsigned long *len, |
258 | struct file **filep) | 258 | struct file **filep) |
259 | { | 259 | { |
260 | int put_needed, ret = 0; | 260 | int ret = 0; |
261 | struct file *file; | 261 | struct fd f = fdget(img->memory_id); |
262 | 262 | if (f.file == NULL) | |
263 | file = fget_light(img->memory_id, &put_needed); | ||
264 | if (file == NULL) | ||
265 | return -1; | 263 | return -1; |
266 | 264 | ||
267 | if (MAJOR(file->f_dentry->d_inode->i_rdev) == FB_MAJOR) { | 265 | if (MAJOR(f.file->f_dentry->d_inode->i_rdev) == FB_MAJOR) { |
268 | *start = info->fix.smem_start; | 266 | *start = info->fix.smem_start; |
269 | *len = info->fix.smem_len; | 267 | *len = info->fix.smem_len; |
270 | } else | 268 | } else |
271 | ret = -1; | 269 | ret = -1; |
272 | fput_light(file, put_needed); | 270 | fdput(f); |
273 | 271 | ||
274 | return ret; | 272 | return ret; |
275 | } | 273 | } |