[media] staging: as102: Fix CodingStyle errors in file as10x_cmd_cfg.c
Fix Linux kernel coding style (whitespace and indentation) errors in file as10x_cmd_cfg.c. No functional changes. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl> Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
c7a6c00194
commit
e2e02ca488
1 changed files with 108 additions and 110 deletions
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
\file as10x_cmd_cfg.c
|
\file as10x_cmd_cfg.c
|
||||||
|
|
||||||
\version $Id$
|
|
||||||
|
|
||||||
\author: S. Martinelli
|
\author: S. Martinelli
|
||||||
|
|
||||||
----------------------------------------------------------------------------\n
|
----------------------------------------------------------------------------\n
|
||||||
|
@ -22,7 +20,8 @@
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include "as102_drv.h"
|
#include "as102_drv.h"
|
||||||
#elif defined(WIN32)
|
#elif defined(WIN32)
|
||||||
#if defined(__BUILDMACHINE__) && (__BUILDMACHINE__ == WinDDK) /* win32 ddk implementation */
|
#if defined(__BUILDMACHINE__) && (__BUILDMACHINE__ == WinDDK)
|
||||||
|
/* win32 ddk implementation */
|
||||||
#include "wdm.h"
|
#include "wdm.h"
|
||||||
#include "Device.h"
|
#include "Device.h"
|
||||||
#include "endian_mgmt.h" /* FIXME */
|
#include "endian_mgmt.h" /* FIXME */
|
||||||
|
@ -77,26 +76,26 @@ int as10x_cmd_get_context(as10x_handle_t *phandle, uint16_t tag,
|
||||||
pcmd->body.context.req.type = cpu_to_le16(GET_CONTEXT_DATA);
|
pcmd->body.context.req.type = cpu_to_le16(GET_CONTEXT_DATA);
|
||||||
|
|
||||||
/* send command */
|
/* send command */
|
||||||
if(phandle->ops->xfer_cmd) {
|
if (phandle->ops->xfer_cmd) {
|
||||||
error = phandle->ops->xfer_cmd(phandle,
|
error = phandle->ops->xfer_cmd(phandle,
|
||||||
(uint8_t *) pcmd,
|
(uint8_t *) pcmd,
|
||||||
sizeof(pcmd->body.context.req) + HEADER_SIZE,
|
sizeof(pcmd->body.context.req)
|
||||||
|
+ HEADER_SIZE,
|
||||||
(uint8_t *) prsp,
|
(uint8_t *) prsp,
|
||||||
sizeof(prsp->body.context.rsp) + HEADER_SIZE);
|
sizeof(prsp->body.context.rsp)
|
||||||
}
|
+ HEADER_SIZE);
|
||||||
else{
|
} else {
|
||||||
error = AS10X_CMD_ERROR;
|
error = AS10X_CMD_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(error < 0) {
|
if (error < 0)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
|
||||||
|
|
||||||
/* parse response: context command do not follow the common response */
|
/* parse response: context command do not follow the common response */
|
||||||
/* structure -> specific handling response parse required */
|
/* structure -> specific handling response parse required */
|
||||||
error = as10x_context_rsp_parse(prsp, CONTROL_PROC_CONTEXT_RSP);
|
error = as10x_context_rsp_parse(prsp, CONTROL_PROC_CONTEXT_RSP);
|
||||||
|
|
||||||
if(error == 0) {
|
if (error == 0) {
|
||||||
/* Response OK -> get response data */
|
/* Response OK -> get response data */
|
||||||
*pvalue = le32_to_cpu(prsp->body.context.rsp.reg_val.u.value32);
|
*pvalue = le32_to_cpu(prsp->body.context.rsp.reg_val.u.value32);
|
||||||
/* value returned is always a 32-bit value */
|
/* value returned is always a 32-bit value */
|
||||||
|
@ -104,7 +103,7 @@ int as10x_cmd_get_context(as10x_handle_t *phandle, uint16_t tag,
|
||||||
|
|
||||||
out:
|
out:
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return(error);
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,7 +126,8 @@ int as10x_cmd_set_context(as10x_handle_t *phandle, uint16_t tag,
|
||||||
prsp = phandle->rsp;
|
prsp = phandle->rsp;
|
||||||
|
|
||||||
/* prepare command */
|
/* prepare command */
|
||||||
as10x_cmd_build(pcmd,(++phandle->cmd_xid),sizeof(pcmd->body.context.req));
|
as10x_cmd_build(pcmd, (++phandle->cmd_xid),
|
||||||
|
sizeof(pcmd->body.context.req));
|
||||||
|
|
||||||
/* fill command */
|
/* fill command */
|
||||||
pcmd->body.context.req.proc_id = cpu_to_le16(CONTROL_PROC_CONTEXT);
|
pcmd->body.context.req.proc_id = cpu_to_le16(CONTROL_PROC_CONTEXT);
|
||||||
|
@ -137,20 +137,20 @@ int as10x_cmd_set_context(as10x_handle_t *phandle, uint16_t tag,
|
||||||
pcmd->body.context.req.type = cpu_to_le16(SET_CONTEXT_DATA);
|
pcmd->body.context.req.type = cpu_to_le16(SET_CONTEXT_DATA);
|
||||||
|
|
||||||
/* send command */
|
/* send command */
|
||||||
if(phandle->ops->xfer_cmd){
|
if (phandle->ops->xfer_cmd) {
|
||||||
error = phandle->ops->xfer_cmd(phandle,
|
error = phandle->ops->xfer_cmd(phandle,
|
||||||
(uint8_t *) pcmd,
|
(uint8_t *) pcmd,
|
||||||
sizeof(pcmd->body.context.req) + HEADER_SIZE,
|
sizeof(pcmd->body.context.req)
|
||||||
|
+ HEADER_SIZE,
|
||||||
(uint8_t *) prsp,
|
(uint8_t *) prsp,
|
||||||
sizeof(prsp->body.context.rsp) + HEADER_SIZE);
|
sizeof(prsp->body.context.rsp)
|
||||||
}
|
+ HEADER_SIZE);
|
||||||
else{
|
} else {
|
||||||
error = AS10X_CMD_ERROR;
|
error = AS10X_CMD_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(error < 0) {
|
if (error < 0)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
|
||||||
|
|
||||||
/* parse response: context command do not follow the common response */
|
/* parse response: context command do not follow the common response */
|
||||||
/* structure -> specific handling response parse required */
|
/* structure -> specific handling response parse required */
|
||||||
|
@ -158,7 +158,7 @@ int as10x_cmd_set_context(as10x_handle_t *phandle, uint16_t tag,
|
||||||
|
|
||||||
out:
|
out:
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return(error);
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -193,27 +193,25 @@ int as10x_cmd_eLNA_change_mode(as10x_handle_t *phandle, uint8_t mode)
|
||||||
pcmd->body.cfg_change_mode.req.mode = mode;
|
pcmd->body.cfg_change_mode.req.mode = mode;
|
||||||
|
|
||||||
/* send command */
|
/* send command */
|
||||||
if(phandle->ops->xfer_cmd){
|
if (phandle->ops->xfer_cmd) {
|
||||||
error = phandle->ops->xfer_cmd(phandle,
|
error = phandle->ops->xfer_cmd(phandle, (uint8_t *) pcmd,
|
||||||
(uint8_t *) pcmd,
|
sizeof(pcmd->body.cfg_change_mode.req)
|
||||||
sizeof(pcmd->body.cfg_change_mode.req) + HEADER_SIZE,
|
+ HEADER_SIZE, (uint8_t *) prsp,
|
||||||
(uint8_t *) prsp,
|
sizeof(prsp->body.cfg_change_mode.rsp)
|
||||||
sizeof(prsp->body.cfg_change_mode.rsp) + HEADER_SIZE);
|
+ HEADER_SIZE);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
error = AS10X_CMD_ERROR;
|
error = AS10X_CMD_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(error < 0) {
|
if (error < 0)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
|
||||||
|
|
||||||
/* parse response */
|
/* parse response */
|
||||||
error = as10x_rsp_parse(prsp, CONTROL_PROC_ELNA_CHANGE_MODE_RSP);
|
error = as10x_rsp_parse(prsp, CONTROL_PROC_ELNA_CHANGE_MODE_RSP);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return(error);
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -225,13 +223,13 @@ out:
|
||||||
ABILIS_RC_NOK
|
ABILIS_RC_NOK
|
||||||
\callgraph
|
\callgraph
|
||||||
*/
|
*/
|
||||||
int as10x_context_rsp_parse(struct as10x_cmd_t *prsp, uint16_t proc_id) {
|
int as10x_context_rsp_parse(struct as10x_cmd_t *prsp, uint16_t proc_id)
|
||||||
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = prsp->body.context.rsp.error;
|
err = prsp->body.context.rsp.error;
|
||||||
|
|
||||||
if((err == 0) &&
|
if ((err == 0) &&
|
||||||
(le16_to_cpu(prsp->body.context.rsp.proc_id) == proc_id)) {
|
(le16_to_cpu(prsp->body.context.rsp.proc_id) == proc_id)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue