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
width /= 2;
}
if ((hscale =
(((unsigned long)maxw) << 12) / width - 4096L) >=
0x4000)
if ((hscale = (((unsigned long)maxw) << 12) / width - 4096L) >= 0x4000)
hscale = 0x3fff;
width =
(((unsigned long)maxw) << 12) / (hscale + 4096L);
if ((vscale =
(((unsigned long)maxh) << 12) / height - 4096L) >=
0x4000)
width = (((unsigned long)maxw) << 12) / (hscale + 4096L);
if ((vscale = (((unsigned long)maxh) << 12) / height - 4096L) >= 0x4000)
vscale = 0x3fff;
height =
(((unsigned long)maxh) << 12) / (vscale + 4096L);
height = (((unsigned long)maxh) << 12) / (vscale + 4096L);
format->fmt.pix.width = width;
format->fmt.pix.height = height;
......@@ -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;
em28xx_videodbg("%s: returned %dx%d (%d, %d)\n",
cmd ==
VIDIOC_TRY_FMT ? "VIDIOC_TRY_FMT" :
"VIDIOC_S_FMT", format->fmt.pix.width,
format->fmt.pix.height, hscale, vscale);
cmd == VIDIOC_TRY_FMT ?
"VIDIOC_TRY_FMT" :"VIDIOC_S_FMT",
format->fmt.pix.width, format->fmt.pix.height, hscale, vscale);
if (cmd == VIDIOC_TRY_FMT)
return 0;
......@@ -1064,7 +1059,7 @@ static int em28xx_set_fmt(struct em28xx *dev, unsigned int cmd, struct v4l2_form
dev->width = width;
dev->height = height;
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->hscale = hscale;
dev->vscale = vscale;
......@@ -1176,7 +1171,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
i->std |= tvnorms[n].id;
return 0;
}
case VIDIOC_G_INPUT:
{
int *i = arg;
......@@ -1184,7 +1178,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
return 0;
}
case VIDIOC_S_INPUT:
{
int *index = arg;
......@@ -1200,7 +1193,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
return 0;
}
case VIDIOC_G_AUDIO:
{
struct v4l2_audio *a = arg;
......@@ -1220,10 +1212,10 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
a->index = index;
return 0;
}
case VIDIOC_S_AUDIO:
{
struct v4l2_audio *a = arg;
if (a->index != dev->ctl_ainput)
return -EINVAL;
......@@ -1265,7 +1257,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
return -EINVAL;
}
case VIDIOC_G_CTRL:
{
struct v4l2_control *ctrl = arg;
......@@ -1282,7 +1273,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
return saa711x_get_ctrl(dev, ctrl);
} else return retval;
}
case VIDIOC_S_CTRL:
{
struct v4l2_control *ctrl = arg;
......@@ -1329,7 +1319,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
return -EINVAL;
}
/* --- tuner ioctls ------------------------------------------ */
case VIDIOC_G_TUNER:
{
......@@ -1409,7 +1398,6 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
up(&dev->lock);
return 0;
}
case VIDIOC_CROPCAP:
{
struct v4l2_cropcap *cc = arg;
......@@ -1507,7 +1495,6 @@ static int em28xx_video_do_ioctl(struct inode *inode, struct file *filp,
cap->capabilities |= V4L2_CAP_TUNER;
return 0;
}
/* --- capture ioctls ---------------------------------------- */
case VIDIOC_ENUM_FMT:
{
......@@ -1522,7 +1509,6 @@ static int em28xx_video_do_ioctl(struct inode *inode, struct file *filp,
memset(fmtd->reserved, 0, sizeof(fmtd->reserved));
return 0;
}
case VIDIOC_G_FMT:
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,
dev->io = rb->count ? IO_MMAP : IO_NONE;
return 0;
}
case VIDIOC_QUERYBUF:
{
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