Skip to content

Commit 3b6456d

Browse files
author
Al Viro
committed
zoran: don't bother with struct file * in zoran_map
all we need it for is file->private_data, which is assign-once, already assigned by that point and, incidentally, its value is already in use by zoran ->mmap() anyway. So just store that pointer instead... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 3b8b487 commit 3b6456d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

drivers/media/video/zoran/zoran.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,10 @@ struct zoran_jpg_settings {
172172
struct v4l2_jpegcompression jpg_comp; /* JPEG-specific capture settings */
173173
};
174174

175+
struct zoran_fh;
176+
175177
struct zoran_mapping {
176-
struct file *file;
178+
struct zoran_fh *fh;
177179
int count;
178180
};
179181

drivers/media/video/zoran/zoran_driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2811,7 +2811,7 @@ static void
28112811
zoran_vm_close (struct vm_area_struct *vma)
28122812
{
28132813
struct zoran_mapping *map = vma->vm_private_data;
2814-
struct zoran_fh *fh = map->file->private_data;
2814+
struct zoran_fh *fh = map->fh;
28152815
struct zoran *zr = fh->zr;
28162816
int i;
28172817

@@ -2938,7 +2938,7 @@ zoran_mmap (struct file *file,
29382938
res = -ENOMEM;
29392939
goto mmap_unlock_and_return;
29402940
}
2941-
map->file = file;
2941+
map->fh = fh;
29422942
map->count = 1;
29432943

29442944
vma->vm_ops = &zoran_vm_ops;

0 commit comments

Comments
 (0)