}
if (VIDEOBUF_NEEDS_INIT == buf->vb.state) {
- if (0 != (rc = videobuf_iolock(vq, &buf->vb, NULL)))
+ rc = videobuf_iolock(vq, &buf->vb, NULL);
+ if (rc != 0)
goto fail;
urb_init = 1;
}
if (!res_get(dev, fh, false))
return -EBUSY;
- return (videobuf_streamon(&fh->vb_vidq));
+ return videobuf_streamon(&fh->vb_vidq);
}
static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i)
{
- struct tm6000_fh *fh=priv;
+ struct tm6000_fh *fh = priv;
struct tm6000_core *dev = fh->dev;
if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
videobuf_streamoff(&fh->vb_vidq);
- res_free(dev,fh);
+ res_free(dev, fh);
- return (0);
+ return 0;
}
-static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *norm)
+static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *norm)
{
- int rc=0;
- struct tm6000_fh *fh=priv;
+ int rc = 0;
+ struct tm6000_fh *fh = priv;
struct tm6000_core *dev = fh->dev;
dev->norm = *norm;
fh->width = dev->width;
fh->height = dev->height;
- if (rc<0)
+ if (rc < 0)
return rc;
v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std, dev->norm);
return 0;
}
-static const char *iname [] = {
+static const char *iname[] = {
[TM6000_INPUT_TV] = "Television",
[TM6000_INPUT_COMPOSITE1] = "Composite 1",
[TM6000_INPUT_COMPOSITE2] = "Composite 2",
struct tm6000_fh *fh = priv;
struct tm6000_core *dev = fh->dev;
- if (dev->input !=5)
+ if (dev->input != 5)
return -EINVAL;
- *i = dev->input -5;
+ *i = dev->input - 5;
return 0;
}
fh->fmt = format_by_fourcc(dev->fourcc);
- tm6000_get_std_res (dev);
+ tm6000_get_std_res(dev);
fh->width = dev->width;
fh->height = dev->height;
dprintk(dev, V4L2_DEBUG_OPEN, "Open: fh=0x%08lx, dev=0x%08lx, "
"dev->vidq=0x%08lx\n",
- (unsigned long)fh,(unsigned long)dev,(unsigned long)&dev->vidq);
+ (unsigned long)fh, (unsigned long)dev, (unsigned long)&dev->vidq);
dprintk(dev, V4L2_DEBUG_OPEN, "Open: list_empty "
- "queued=%d\n",list_empty(&dev->vidq.queued));
+ "queued=%d\n", list_empty(&dev->vidq.queued));
dprintk(dev, V4L2_DEBUG_OPEN, "Open: list_empty "
- "active=%d\n",list_empty(&dev->vidq.active));
+ "active=%d\n", list_empty(&dev->vidq.active));
/* initialize hardware on analog mode */
rc = tm6000_init_analog_mode(dev);
{
struct tm6000_fh *fh = file->private_data;
- if (fh->type==V4L2_BUF_TYPE_VIDEO_CAPTURE) {
+ if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
if (!res_get(fh->dev, fh, true))
return -EBUSY;
/* streaming capture */
if (list_empty(&fh->vb_vidq.stream))
return POLLERR;
- buf = list_entry(fh->vb_vidq.stream.next,struct tm6000_buffer,vb.stream);
+ buf = list_entry(fh->vb_vidq.stream.next, struct tm6000_buffer, vb.stream);
} else {
/* read() capture */
return videobuf_poll_stream(file, &fh->vb_vidq,
struct video_device tm6000_radio_template = {
.name = "tm6000",
.fops = &radio_fops,
- .ioctl_ops = &radio_ioctl_ops,
+ .ioctl_ops = &radio_ioctl_ops,
};
/* -----------------------------------------------------------------