From 3b6456d2c3fc9d0c4ec1db5d6594f40098ff0a6f Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 14 Jul 2012 13:49:40 +0400 Subject: 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 --- drivers/media/video/zoran/zoran.h | 4 +++- drivers/media/video/zoran/zoran_driver.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/zoran/zoran.h b/drivers/media/video/zoran/zoran.h index d7166afc255..ca2754a3cd6 100644 --- a/drivers/media/video/zoran/zoran.h +++ b/drivers/media/video/zoran/zoran.h @@ -172,8 +172,10 @@ struct zoran_jpg_settings { struct v4l2_jpegcompression jpg_comp; /* JPEG-specific capture settings */ }; +struct zoran_fh; + struct zoran_mapping { - struct file *file; + struct zoran_fh *fh; int count; }; diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c index c5731093181..c6ccdeb6d8d 100644 --- a/drivers/media/video/zoran/zoran_driver.c +++ b/drivers/media/video/zoran/zoran_driver.c @@ -2811,7 +2811,7 @@ static void zoran_vm_close (struct vm_area_struct *vma) { struct zoran_mapping *map = vma->vm_private_data; - struct zoran_fh *fh = map->file->private_data; + struct zoran_fh *fh = map->fh; struct zoran *zr = fh->zr; int i; @@ -2938,7 +2938,7 @@ zoran_mmap (struct file *file, res = -ENOMEM; goto mmap_unlock_and_return; } - map->file = file; + map->fh = fh; map->count = 1; vma->vm_ops = &zoran_vm_ops; -- cgit v1.2.3-18-g5258