Commit 584b2373 authored by Piyush Thange's avatar Piyush Thange Committed by Mauro Carvalho Chehab
Browse files

media: usb: cpia2: Fixed Coding Style issues



Fixed all the Coding style issues generated by checkpatch.pl.
The changes made considering the --strict option.

Signed-off-by: default avatarPiyush Thange <pthange19@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 5d11e6aa
Loading
Loading
Loading
Loading
+74 −75
Original line number Diff line number Diff line
@@ -153,7 +153,6 @@ static ssize_t cpia2_v4l_read(struct file *file, char __user *buf, size_t count,
	return ret;
}


/******************************************************************************
 *
 *  cpia2_v4l_poll
@@ -170,7 +169,6 @@ static __poll_t cpia2_v4l_poll(struct file *filp, struct poll_table_struct *wait
	return res;
}


static int sync(struct camera_data *cam, int frame_nr)
{
	struct framebuf *frame = &cam->buffers[frame_nr];
@@ -383,7 +381,8 @@ static int cpia2_s_fmt_vid_cap(struct file *file, void *_fh,
	cam->pixelformat = f->fmt.pix.pixelformat;

	/* NOTE: This should be set to 1 for MJPEG, but some apps don't handle
	 * the missing Huffman table properly. */
	 * the missing Huffman table properly.
	 */
	cam->params.compression.inhibit_htables = 0;
		/*f->fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG;*/

@@ -549,7 +548,6 @@ static const struct {
static int cpia2_enum_framesizes(struct file *file, void *fh,
				 struct v4l2_frmsizeenum *fsize)
{

	if (fsize->pixel_format != V4L2_PIX_FMT_MJPEG &&
	    fsize->pixel_format != V4L2_PIX_FMT_JPEG)
		return -EINVAL;
@@ -665,9 +663,8 @@ static int cpia2_g_jpegcomp(struct file *file, void *fh, struct v4l2_jpegcompres
	parms->quality = 80; // TODO: Can this be made meaningful?

	parms->jpeg_markers = V4L2_JPEG_MARKER_DQT | V4L2_JPEG_MARKER_DRI;
	if(!cam->params.compression.inhibit_htables) {
	if (!cam->params.compression.inhibit_htables)
		parms->jpeg_markers |= V4L2_JPEG_MARKER_DHT;
	}

	parms->APPn = cam->APPn;
	parms->APP_len = cam->APP_len;
@@ -849,6 +846,7 @@ static int find_earliest_filled_buffer(struct camera_data *cam)
{
	int i;
	int found = -1;

	for (i = 0; i < cam->num_frames; i++) {
		if (cam->buffers[i].status == FRAME_READY) {
			if (found < 0) {
@@ -888,6 +886,7 @@ static int cpia2_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
	if (frame < 0) {
		/* Wait for a frame to become available */
		struct framebuf *cb = cam->curbuff;

		mutex_unlock(&cam->v4l2_lock);
		wait_event_interruptible(cam->wq_stream,
					 !video_is_registered(&cam->vdev) ||
@@ -900,7 +899,6 @@ static int cpia2_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
		frame = cb->num;
	}


	buf->index = frame;
	buf->bytesused = cam->buffers[buf->index].length;
	buf->flags = V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_DONE
@@ -1106,13 +1104,16 @@ int cpia2_register_camera(struct camera_data *cam)
	if (cam->params.pnp_id.device_type == DEVICE_STV_672)
		v4l2_ctrl_new_std_menu(hdl, &cpia2_ctrl_ops,
				       V4L2_CID_POWER_LINE_FREQUENCY,
			V4L2_CID_POWER_LINE_FREQUENCY_60HZ, 0, 0);
				       V4L2_CID_POWER_LINE_FREQUENCY_60HZ,
				       0, 0);
	/* Light control only valid for the QX5 Microscope */
	if (cam->params.pnp_id.product == 0x151) {
		cam->top_light = v4l2_ctrl_new_std(hdl, &cpia2_ctrl_ops,
				V4L2_CID_ILLUMINATORS_1, 0, 1, 1, 0);
						   V4L2_CID_ILLUMINATORS_1,
						   0, 1, 1, 0);
		cam->bottom_light = v4l2_ctrl_new_std(hdl, &cpia2_ctrl_ops,
				V4L2_CID_ILLUMINATORS_2, 0, 1, 1, 0);
						      V4L2_CID_ILLUMINATORS_2,
						      0, 1, 1, 0);
		v4l2_ctrl_cluster(2, &cam->top_light);
	}

@@ -1197,7 +1198,6 @@ static void __init check_parameters(void)

/************   Module Stuff ***************/


/******************************************************************************
 *
 * cpia2_init/module_init
@@ -1211,7 +1211,6 @@ static int __init cpia2_init(void)
	return cpia2_usb_init();
}


/******************************************************************************
 *
 * cpia2_exit/module_exit