Skip to content

Commit

Permalink
V4L/DVB (10933): zoran: Pass zoran_fh pointers instead of file pointers
Browse files Browse the repository at this point in the history
Many functions had a struct file pointer argument, but all they wants is
the struct zoran_fh pointer from the file's private data.  Since every
caller of those functions already has the zoran_fh, just pass the that
instead.  This saves a dereference in each function change.

While I'm at it, change the code formatting of affected functions to be
kernel standard style.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent ee9a9d6 commit e5ee3f6
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 110 deletions.
6 changes: 1 addition & 5 deletions drivers/media/video/zoran/zoran_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,8 @@ zr36057_overlay (struct zoran *zr,
* and the maximum window size is BUZ_MAX_WIDTH * BUZ_MAX_HEIGHT pixels.
*/

void
write_overlay_mask (struct file *file,
struct v4l2_clip *vp,
int count)
void write_overlay_mask(struct zoran_fh *fh, struct v4l2_clip *vp, int count)
{
struct zoran_fh *fh = file->private_data;
struct zoran *zr = fh->zr;
unsigned mask_line_size = (BUZ_MAX_WIDTH + 31) / 32;
u32 *mask;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/zoran/zoran_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extern int jpeg_codec_reset(struct zoran *zr);
/* zr360x7 access to raw capture */
extern void zr36057_overlay(struct zoran *zr,
int on);
extern void write_overlay_mask(struct file *file,
extern void write_overlay_mask(struct zoran_fh *fh,
struct v4l2_clip *vp,
int count);
extern void zr36057_set_memgrab(struct zoran *zr,
Expand Down
Loading

0 comments on commit e5ee3f6

Please sign in to comment.