Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79848e9a authored by Devin Heitmueller's avatar Devin Heitmueller Committed by Mauro Carvalho Chehab
Browse files

[media] staging: as102: Fix CodingStyle errors in file as10x_cmd_stream.c



Fix Linux kernel coding style (whitespace and indentation) errors
in file as10x_cmd_stream.c. No functional changes.

Signed-off-by: default avatarDevin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: default avatarPiotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: default avatarSylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 9cc08121
Loading
Loading
Loading
Loading
+136 −144
Original line number Diff line number Diff line
@@ -2,8 +2,6 @@

 \file   as10x_cmd_stream.c

 \version $Id$

 \author: S. Martinelli

 ----------------------------------------------------------------------------\n
@@ -54,7 +52,8 @@
   \callgraph
*/
int as10x_cmd_add_PID_filter(as10x_handle_t *phandle,
			     struct as10x_ts_filter *filter) {
			     struct as10x_ts_filter *filter)
{
	int error;
	struct as10x_cmd_t *pcmd, *prsp;

@@ -68,7 +67,8 @@ int as10x_cmd_add_PID_filter(as10x_handle_t* phandle,
			sizeof(pcmd->body.add_pid_filter.req));

	/* fill command */
   pcmd->body.add_pid_filter.req.proc_id = cpu_to_le16(CONTROL_PROC_SETFILTER);
	pcmd->body.add_pid_filter.req.proc_id =
		cpu_to_le16(CONTROL_PROC_SETFILTER);
	pcmd->body.add_pid_filter.req.pid = cpu_to_le16(filter->pid);
	pcmd->body.add_pid_filter.req.stream_type = filter->type;

@@ -79,19 +79,17 @@ int as10x_cmd_add_PID_filter(as10x_handle_t* phandle,

	/* send command */
	if (phandle->ops->xfer_cmd) {
      error = phandle->ops->xfer_cmd(phandle,
		       (uint8_t *) pcmd,
		       sizeof(pcmd->body.add_pid_filter.req) + HEADER_SIZE,
		       (uint8_t *) prsp,
		       sizeof(prsp->body.add_pid_filter.rsp) + HEADER_SIZE);
   }
   else{
		error = phandle->ops->xfer_cmd(phandle, (uint8_t *) pcmd,
				sizeof(pcmd->body.add_pid_filter.req)
				+ HEADER_SIZE, (uint8_t *) prsp,
				sizeof(prsp->body.add_pid_filter.rsp)
				+ HEADER_SIZE);
	} else {
		error = AS10X_CMD_ERROR;
	}

   if(error < 0) {
	if (error < 0)
		goto out;
   }

	/* parse response */
	error = as10x_rsp_parse(prsp, CONTROL_PROC_SETFILTER_RSP);
@@ -103,7 +101,7 @@ int as10x_cmd_add_PID_filter(as10x_handle_t* phandle,

out:
	LEAVE();
   return(error);
	return error;
}

/**
@@ -116,7 +114,6 @@ int as10x_cmd_add_PID_filter(as10x_handle_t* phandle,
int as10x_cmd_del_PID_filter(as10x_handle_t *phandle,
			     uint16_t pid_value)
{

	int error;
	struct as10x_cmd_t *pcmd, *prsp;

@@ -130,37 +127,36 @@ int as10x_cmd_del_PID_filter(as10x_handle_t* phandle,
			sizeof(pcmd->body.del_pid_filter.req));

	/* fill command */
   pcmd->body.del_pid_filter.req.proc_id = cpu_to_le16(CONTROL_PROC_REMOVEFILTER);
	pcmd->body.del_pid_filter.req.proc_id =
		cpu_to_le16(CONTROL_PROC_REMOVEFILTER);
	pcmd->body.del_pid_filter.req.pid = cpu_to_le16(pid_value);

	/* send command */
	if (phandle->ops->xfer_cmd) {
      error = phandle->ops->xfer_cmd(phandle,
		       (uint8_t *) pcmd,
		       sizeof(pcmd->body.del_pid_filter.req) + HEADER_SIZE,
		       (uint8_t *) prsp,
		       sizeof(prsp->body.del_pid_filter.rsp) + HEADER_SIZE);
   }
   else{
		error = phandle->ops->xfer_cmd(phandle, (uint8_t *) pcmd,
				sizeof(pcmd->body.del_pid_filter.req)
				+ HEADER_SIZE, (uint8_t *) prsp,
				sizeof(prsp->body.del_pid_filter.rsp)
				+ HEADER_SIZE);
	} else {
		error = AS10X_CMD_ERROR;
	}

   if(error < 0) {
	if (error < 0)
		goto out;
   }

	/* parse response */
	error = as10x_rsp_parse(prsp, CONTROL_PROC_REMOVEFILTER_RSP);

out:
	LEAVE();
   return(error);
	return error;
}

/**
   \brief Send start streaming command to AS10x
   \param  phandle:   pointer to AS10x handle
   \return 0 when no error, < 0 in case of error. 
   \return 0 when no error, < 0 in case of error.
   \callgraph
*/
int as10x_cmd_start_streaming(as10x_handle_t *phandle)
@@ -183,32 +179,30 @@ int as10x_cmd_start_streaming(as10x_handle_t* phandle)

	/* send command */
	if (phandle->ops->xfer_cmd) {
      error = phandle->ops->xfer_cmd(phandle,
		       (uint8_t *) pcmd,
		       sizeof(pcmd->body.start_streaming.req) + HEADER_SIZE,
		       (uint8_t *) prsp,
		       sizeof(prsp->body.start_streaming.rsp) + HEADER_SIZE);
   }
   else{
		error = phandle->ops->xfer_cmd(phandle, (uint8_t *) pcmd,
				sizeof(pcmd->body.start_streaming.req)
				+ HEADER_SIZE, (uint8_t *) prsp,
				sizeof(prsp->body.start_streaming.rsp)
				+ HEADER_SIZE);
	} else {
		error = AS10X_CMD_ERROR;
	}

   if(error < 0) {
	if (error < 0)
		goto out;
   }

	/* parse response */
	error = as10x_rsp_parse(prsp, CONTROL_PROC_START_STREAMING_RSP);

out:
	LEAVE();
   return(error);
	return error;
}

/**
   \brief Send stop streaming command to AS10x
   \param  phandle:   pointer to AS10x handle
   \return 0 when no error, < 0 in case of error. 
   \return 0 when no error, < 0 in case of error.
   \callgraph
*/
int as10x_cmd_stop_streaming(as10x_handle_t *phandle)
@@ -231,26 +225,24 @@ int as10x_cmd_stop_streaming(as10x_handle_t* phandle)

	/* send command */
	if (phandle->ops->xfer_cmd) {
      error = phandle->ops->xfer_cmd(phandle,
		       (uint8_t *) pcmd,
		       sizeof(pcmd->body.stop_streaming.req) + HEADER_SIZE,
		       (uint8_t *) prsp,
		       sizeof(prsp->body.stop_streaming.rsp) + HEADER_SIZE);
   }
   else{
		error = phandle->ops->xfer_cmd(phandle, (uint8_t *) pcmd,
				sizeof(pcmd->body.stop_streaming.req)
				+ HEADER_SIZE, (uint8_t *) prsp,
				sizeof(prsp->body.stop_streaming.rsp)
				+ HEADER_SIZE);
	} else {
		error = AS10X_CMD_ERROR;
	}

   if(error < 0) {
	if (error < 0)
		goto out;
   }

	/* parse response */
	error = as10x_rsp_parse(prsp, CONTROL_PROC_STOP_STREAMING_RSP);

out:
	LEAVE();
   return(error);
	return error;
}