Commit 9aeb4b05 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Mauro Carvalho Chehab

V4L/DVB (3423): CodingStyle fixes.

- CodingStyle fixes.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 2d50f847
...@@ -1012,19 +1012,15 @@ static int em28xx_set_fmt(struct em28xx *dev, unsigned int cmd, struct v4l2_form ...@@ -1012,19 +1012,15 @@ static int em28xx_set_fmt(struct em28xx *dev, unsigned int cmd, struct v4l2_form
width /= 2; width /= 2;
} }
if ((hscale = if ((hscale = (((unsigned long)maxw) << 12) / width - 4096L) >= 0x4000)
(((unsigned long)maxw) << 12) / width - 4096L) >=
0x4000)
hscale = 0x3fff; hscale = 0x3fff;
width =
(((unsigned long)maxw) << 12) / (hscale + 4096L);
if ((vscale = width = (((unsigned long)maxw) << 12) / (hscale + 4096L);
(((unsigned long)maxh) << 12) / height - 4096L) >=
0x4000) if ((vscale = (((unsigned long)maxh) << 12) / height - 4096L) >= 0x4000)
vscale = 0x3fff; vscale = 0x3fff;
height =
(((unsigned long)maxh) << 12) / (vscale + 4096L); height = (((unsigned long)maxh) << 12) / (vscale + 4096L);
format->fmt.pix.width = width; format->fmt.pix.width = width;
format->fmt.pix.height = height; format->fmt.pix.height = height;
...@@ -1035,10 +1031,9 @@ static int em28xx_set_fmt(struct em28xx *dev, unsigned int cmd, struct v4l2_form ...@@ -1035,10 +1031,9 @@ static int em28xx_set_fmt(struct em28xx *dev, unsigned int cmd, struct v4l2_form
format->fmt.pix.field = V4L2_FIELD_INTERLACED; format->fmt.pix.field = V4L2_FIELD_INTERLACED;
em28xx_videodbg("%s: returned %dx%d (%d, %d)\n", em28xx_videodbg("%s: returned %dx%d (%d, %d)\n",
cmd == cmd == VIDIOC_TRY_FMT ?
VIDIOC_TRY_FMT ? "VIDIOC_TRY_FMT" : "VIDIOC_TRY_FMT" :"VIDIOC_S_FMT",
"VIDIOC_S_FMT", format->fmt.pix.width, format->fmt.pix.width, format->fmt.pix.height, hscale, vscale);
format->fmt.pix.height, hscale, vscale);
if (cmd == VIDIOC_TRY_FMT) if (cmd == VIDIOC_TRY_FMT)
return 0; return 0;
...@@ -1064,7 +1059,7 @@ static int em28xx_set_fmt(struct em28xx *dev, unsigned int cmd, struct v4l2_form ...@@ -1064,7 +1059,7 @@ static int em28xx_set_fmt(struct em28xx *dev, unsigned int cmd, struct v4l2_form
dev->width = width; dev->width = width;
dev->height = height; dev->height = height;
dev->frame_size = dev->width * dev->height * 2; dev->frame_size = dev->width * dev->height * 2;
dev->field_size = dev->frame_size >> 1; /*both_fileds ? dev->frame_size>>1 : dev->frame_size; */ dev->field_size = dev->frame_size >> 1;
dev->bytesperline = dev->width * 2; dev->bytesperline = dev->width * 2;
dev->hscale = hscale; dev->hscale = hscale;
dev->vscale = vscale; dev->vscale = vscale;
...@@ -1176,7 +1171,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp, ...@@ -1176,7 +1171,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
i->std |= tvnorms[n].id; i->std |= tvnorms[n].id;
return 0; return 0;
} }
case VIDIOC_G_INPUT: case VIDIOC_G_INPUT:
{ {
int *i = arg; int *i = arg;
...@@ -1184,7 +1178,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp, ...@@ -1184,7 +1178,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
return 0; return 0;
} }
case VIDIOC_S_INPUT: case VIDIOC_S_INPUT:
{ {
int *index = arg; int *index = arg;
...@@ -1200,7 +1193,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp, ...@@ -1200,7 +1193,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
return 0; return 0;
} }
case VIDIOC_G_AUDIO: case VIDIOC_G_AUDIO:
{ {
struct v4l2_audio *a = arg; struct v4l2_audio *a = arg;
...@@ -1220,10 +1212,10 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp, ...@@ -1220,10 +1212,10 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
a->index = index; a->index = index;
return 0; return 0;
} }
case VIDIOC_S_AUDIO: case VIDIOC_S_AUDIO:
{ {
struct v4l2_audio *a = arg; struct v4l2_audio *a = arg;
if (a->index != dev->ctl_ainput) if (a->index != dev->ctl_ainput)
return -EINVAL; return -EINVAL;
...@@ -1265,7 +1257,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp, ...@@ -1265,7 +1257,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
return -EINVAL; return -EINVAL;
} }
case VIDIOC_G_CTRL: case VIDIOC_G_CTRL:
{ {
struct v4l2_control *ctrl = arg; struct v4l2_control *ctrl = arg;
...@@ -1282,7 +1273,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp, ...@@ -1282,7 +1273,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
return saa711x_get_ctrl(dev, ctrl); return saa711x_get_ctrl(dev, ctrl);
} else return retval; } else return retval;
} }
case VIDIOC_S_CTRL: case VIDIOC_S_CTRL:
{ {
struct v4l2_control *ctrl = arg; struct v4l2_control *ctrl = arg;
...@@ -1329,7 +1319,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp, ...@@ -1329,7 +1319,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
return -EINVAL; return -EINVAL;
} }
/* --- tuner ioctls ------------------------------------------ */ /* --- tuner ioctls ------------------------------------------ */
case VIDIOC_G_TUNER: case VIDIOC_G_TUNER:
{ {
...@@ -1409,7 +1398,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp, ...@@ -1409,7 +1398,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
up(&dev->lock); up(&dev->lock);
return 0; return 0;
} }
case VIDIOC_CROPCAP: case VIDIOC_CROPCAP:
{ {
struct v4l2_cropcap *cc = arg; struct v4l2_cropcap *cc = arg;
...@@ -1507,7 +1495,6 @@ static int em28xx_video_do_ioctl(struct inode *inode, struct file *filp, ...@@ -1507,7 +1495,6 @@ static int em28xx_video_do_ioctl(struct inode *inode, struct file *filp,
cap->capabilities |= V4L2_CAP_TUNER; cap->capabilities |= V4L2_CAP_TUNER;
return 0; return 0;
} }
/* --- capture ioctls ---------------------------------------- */ /* --- capture ioctls ---------------------------------------- */
case VIDIOC_ENUM_FMT: case VIDIOC_ENUM_FMT:
{ {
...@@ -1522,7 +1509,6 @@ static int em28xx_video_do_ioctl(struct inode *inode, struct file *filp, ...@@ -1522,7 +1509,6 @@ static int em28xx_video_do_ioctl(struct inode *inode, struct file *filp,
memset(fmtd->reserved, 0, sizeof(fmtd->reserved)); memset(fmtd->reserved, 0, sizeof(fmtd->reserved));
return 0; return 0;
} }
case VIDIOC_G_FMT: case VIDIOC_G_FMT:
return em28xx_get_fmt(dev, (struct v4l2_format *) arg); return em28xx_get_fmt(dev, (struct v4l2_format *) arg);
...@@ -1573,7 +1559,6 @@ static int em28xx_video_do_ioctl(struct inode *inode, struct file *filp, ...@@ -1573,7 +1559,6 @@ static int em28xx_video_do_ioctl(struct inode *inode, struct file *filp,
dev->io = rb->count ? IO_MMAP : IO_NONE; dev->io = rb->count ? IO_MMAP : IO_NONE;
return 0; return 0;
} }
case VIDIOC_QUERYBUF: case VIDIOC_QUERYBUF:
{ {
struct v4l2_buffer *b = arg; struct v4l2_buffer *b = arg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment