Commit 61ceb7f9 authored by Timo von Holtz's avatar Timo von Holtz Committed by Greg Kroah-Hartman
Browse files

Staging: usbvideo: usbvideo: fixed some coding style issues



fixed coding style issues.

Signed-off-by: default avatarTimo von Holtz <tvh@informatik.uni-kiel.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0ffbf8bf
Loading
Loading
Loading
Loading
+81 −89
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
#include <linux/init.h>
#include <linux/spinlock.h>

#include <asm/io.h>
#include <linux/io.h>

#include "usbvideo.h"

@@ -295,10 +295,9 @@ static void usbvideo_OverlayChar(struct uvd *uvd, struct usbvideo_frame *frame,
	for (iy = 0; iy < 5; iy++) {
		for (ix = 0; ix < 3; ix++) {
			if (digit & 0x8000) {
				if (uvd->paletteBits & (1L << VIDEO_PALETTE_RGB24)) {
				if (uvd->paletteBits & (1L << VIDEO_PALETTE_RGB24))
/* TODO */				RGB24_PUTPIXEL(frame, x+ix, y+iy, 0xFF, 0xFF, 0xFF);
			}
			}
			digit = digit << 1;
		}
	}
@@ -384,11 +383,11 @@ static void usbvideo_OverlayStats(struct uvd *uvd, struct usbvideo_frame *frame)
					continue;
				}
				/* For all other points the Y coordinate does not matter */
				if ((i >= m_ri) && (i <= (m_ri + 3))) {
				if ((i >= m_ri) && (i <= (m_ri + 3)))
					RGB24_PUTPIXEL(frame, i, j, 0x00, 0xFF, 0x00);
				} else if ((i >= m_wi) && (i <= (m_wi + 3))) {
				else if ((i >= m_wi) && (i <= (m_wi + 3)))
					RGB24_PUTPIXEL(frame, i, j, 0xFF, 0x00, 0x00);
				} else if ((i < m_lo) || ((i > m_ri) && (i < m_hi)))
				else if ((i < m_lo) || ((i > m_ri) && (i < m_hi)))
					RGB24_PUTPIXEL(frame, i, j, 0x00, 0x00, 0xFF);
			}
		}
@@ -925,8 +924,7 @@ static int usbvideo_find_struct(struct usbvideo *cams)
	mutex_lock(&cams->lock);
	for (u = 0; u < cams->num_cameras; u++) {
		struct uvd *uvd = &cams->cam[u];
		if (!uvd->uvd_used) /* This one is free */
		{
		if (!uvd->uvd_used) { /* This one is free */
			uvd->uvd_used = 1;	/* In use now */
			mutex_init(&uvd->lock);	/* to 1 == available */
			uvd->dev = NULL;
@@ -1325,9 +1323,8 @@ static long usbvideo_v4l_do_ioctl(struct file *file, unsigned int cmd, void *arg
		{
			struct video_window *vw = arg;

			if(VALID_CALLBACK(uvd, setVideoMode)) {
			if (VALID_CALLBACK(uvd, setVideoMode))
				return GET_CALLBACK(uvd, setVideoMode)(uvd, vw);
			}

			if (vw->flags)
				return -EINVAL;
@@ -1445,9 +1442,8 @@ static long usbvideo_v4l_do_ioctl(struct file *file, unsigned int cmd, void *arg
				ret = usbvideo_GetFrame(uvd, *frameNum);
			else if (VALID_CALLBACK(uvd, getFrame)) {
				ret = GET_CALLBACK(uvd, getFrame)(uvd, *frameNum);
				if ((ret < 0) && (uvd->debug >= 1)) {
				if ((ret < 0) && (uvd->debug >= 1))
					err("VIDIOCSYNC: getFrame() returned %d.", ret);
				}
			} else {
				err("VIDIOCSYNC: getFrame is not set");
				ret = -EFAULT;
@@ -1653,10 +1649,9 @@ static ssize_t usbvideo_v4l_read(struct file *file, char __user *buf,

		/* Mark it as available to be used again. */
		uvd->frame[frmx].frameState = FrameState_Unused;
		if (usbvideo_NewFrame(uvd, (frmx + 1) % USBVIDEO_NUMFRAMES)) {
		if (usbvideo_NewFrame(uvd, (frmx + 1) % USBVIDEO_NUMFRAMES))
			err("%s: usbvideo_NewFrame failed.", __func__);
	}
	}
read_done:
	mutex_unlock(&uvd->lock);
	return count;
@@ -1839,9 +1834,8 @@ static void usbvideo_StopDataPump(struct uvd *uvd)
		dev_info(&uvd->dev->dev, "%s($%p)\n", __func__, uvd);

	/* Unschedule all of the iso td's */
	for (i=0; i < USBVIDEO_NUMSBUF; i++) {
	for (i = 0; i < USBVIDEO_NUMSBUF; i++)
		usb_kill_urb(uvd->sbuf[i].urb);
	}
	if (uvd->debug > 1)
		dev_info(&uvd->dev->dev, "%s: streaming=0\n", __func__);
	uvd->streaming = 0;
@@ -2133,8 +2127,7 @@ void usbvideo_DeinterlaceFrame(struct uvd *uvd, struct usbvideo_frame *frame)
		return;

	if ((frame->deinterlace == Deinterlace_FillEvenLines) ||
	    (frame->deinterlace == Deinterlace_FillOddLines))
	{
	    (frame->deinterlace == Deinterlace_FillOddLines)) {
		const int v4l_linesize = VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL;
		int i = (frame->deinterlace == Deinterlace_FillEvenLines) ? 0 : 1;

@@ -2160,8 +2153,7 @@ void usbvideo_DeinterlaceFrame(struct uvd *uvd, struct usbvideo_frame *frame)
			/* Sanity check */
			if ((ip < 0) || (in < 0) ||
			    (ip >= VIDEOSIZE_Y(frame->request)) ||
			    (in >= VIDEOSIZE_Y(frame->request)))
			{
			    (in >= VIDEOSIZE_Y(frame->request))) {
				err("Error: ip=%d. in=%d. req.height=%ld.",
				    ip, in, VIDEOSIZE_Y(frame->request));
				break;