From: Curtis McEnroe Date: Thu, 2 Jun 2011 02:21:56 +0000 (-0400) Subject: staging: tm6000: cleaned up code in tm6000-video.c according to coding style X-Git-Tag: next-20110726~5^2~522 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ed7c221c9a06f23c7521a9bfac2518656258bbb6;p=karo-tx-linux.git staging: tm6000: cleaned up code in tm6000-video.c according to coding style Fixed all errors reported by the checker in tm6000-video.c mostly relating to whitespace. Signed-off-by: Curtis McEnroe Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 4264064a727e..57896243b38a 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -777,7 +777,8 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, } 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; } @@ -1048,12 +1049,12 @@ static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i) 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) @@ -1062,15 +1063,15 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i) 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; @@ -1079,7 +1080,7 @@ static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *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); @@ -1087,7 +1088,7 @@ static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *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", @@ -1394,10 +1395,10 @@ static int radio_g_input(struct file *filp, void *priv, unsigned int *i) 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; } @@ -1508,18 +1509,18 @@ static int tm6000_open(struct file *file) 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); @@ -1557,7 +1558,7 @@ tm6000_read(struct file *file, char __user *data, size_t count, loff_t *pos) { 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; @@ -1583,7 +1584,7 @@ tm6000_poll(struct file *file, struct poll_table_struct *wait) /* 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, @@ -1699,7 +1700,7 @@ static const struct v4l2_ioctl_ops radio_ioctl_ops = { struct video_device tm6000_radio_template = { .name = "tm6000", .fops = &radio_fops, - .ioctl_ops = &radio_ioctl_ops, + .ioctl_ops = &radio_ioctl_ops, }; /* -----------------------------------------------------------------