提交 833dfbe7 编写于 作者: G Greg Kroah-Hartman

Staging: epl: run Lindent on *.c files

It's a start, still a mess...

Cc: Daniel Krueger <daniel.krueger@systec-electronic.com>
Cc: Ronald Sieber <Ronald.Sieber@systec-electronic.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 e0ca0595
此差异已折叠。
此差异已折叠。
......@@ -75,7 +75,6 @@
#include <asm/uaccess.h>
#endif
/***************************************************************************/
/* */
/* */
......@@ -100,7 +99,6 @@
// local function prototypes
//---------------------------------------------------------------------------
/***************************************************************************/
/* */
/* */
......@@ -114,7 +112,6 @@
//
/***************************************************************************/
//=========================================================================//
// //
// P R I V A T E D E F I N I T I O N S //
......@@ -130,36 +127,33 @@
//---------------------------------------------------------------------------
#if ((EPL_API_PROCESS_IMAGE_SIZE_IN > 0) || (EPL_API_PROCESS_IMAGE_SIZE_OUT > 0))
typedef struct
{
#if EPL_API_PROCESS_IMAGE_SIZE_IN > 0
BYTE m_abProcessImageInput[EPL_API_PROCESS_IMAGE_SIZE_IN];
#endif
#if EPL_API_PROCESS_IMAGE_SIZE_OUT > 0
BYTE m_abProcessImageOutput[EPL_API_PROCESS_IMAGE_SIZE_OUT];
#endif
typedef struct {
#if EPL_API_PROCESS_IMAGE_SIZE_IN > 0
BYTE m_abProcessImageInput[EPL_API_PROCESS_IMAGE_SIZE_IN];
#endif
#if EPL_API_PROCESS_IMAGE_SIZE_OUT > 0
BYTE m_abProcessImageOutput[EPL_API_PROCESS_IMAGE_SIZE_OUT];
#endif
} tEplApiProcessImageInstance;
} tEplApiProcessImageInstance;
//---------------------------------------------------------------------------
// local vars
//---------------------------------------------------------------------------
static tEplApiProcessImageInstance EplApiProcessImageInstance_g;
static tEplApiProcessImageInstance EplApiProcessImageInstance_g;
#endif
//---------------------------------------------------------------------------
// local function prototypes
//---------------------------------------------------------------------------
//=========================================================================//
// //
// P U B L I C F U N C T I O N S //
// //
//=========================================================================//
//---------------------------------------------------------------------------
//
// Function: EplApiProcessImageSetup()
......@@ -177,125 +171,101 @@ static tEplApiProcessImageInstance EplApiProcessImageInstance_g;
tEplKernel PUBLIC EplApiProcessImageSetup(void)
{
tEplKernel Ret = kEplSuccessful;
tEplKernel Ret = kEplSuccessful;
#if ((EPL_API_PROCESS_IMAGE_SIZE_IN > 0) || (EPL_API_PROCESS_IMAGE_SIZE_OUT > 0))
unsigned int uiVarEntries;
tEplObdSize ObdSize;
unsigned int uiVarEntries;
tEplObdSize ObdSize;
#endif
#if EPL_API_PROCESS_IMAGE_SIZE_IN > 0
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN;
ObdSize = 1;
Ret = EplApiLinkObject(
0x2000,
EplApiProcessImageInstance_g.m_abProcessImageInput,
&uiVarEntries,
&ObdSize,
1);
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN;
ObdSize = 1;
Ret = EplApiLinkObject(
0x2001,
EplApiProcessImageInstance_g.m_abProcessImageInput,
&uiVarEntries,
&ObdSize,
1);
ObdSize = 2;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN / ObdSize;
Ret = EplApiLinkObject(
0x2010,
EplApiProcessImageInstance_g.m_abProcessImageInput,
&uiVarEntries,
&ObdSize,
1);
ObdSize = 2;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN / ObdSize;
Ret = EplApiLinkObject(
0x2011,
EplApiProcessImageInstance_g.m_abProcessImageInput,
&uiVarEntries,
&ObdSize,
1);
ObdSize = 4;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN / ObdSize;
Ret = EplApiLinkObject(
0x2020,
EplApiProcessImageInstance_g.m_abProcessImageInput,
&uiVarEntries,
&ObdSize,
1);
ObdSize = 4;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN / ObdSize;
Ret = EplApiLinkObject(
0x2021,
EplApiProcessImageInstance_g.m_abProcessImageInput,
&uiVarEntries,
&ObdSize,
1);
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN;
ObdSize = 1;
Ret = EplApiLinkObject(0x2000,
EplApiProcessImageInstance_g.
m_abProcessImageInput, &uiVarEntries, &ObdSize,
1);
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN;
ObdSize = 1;
Ret = EplApiLinkObject(0x2001,
EplApiProcessImageInstance_g.
m_abProcessImageInput, &uiVarEntries, &ObdSize,
1);
ObdSize = 2;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN / ObdSize;
Ret = EplApiLinkObject(0x2010,
EplApiProcessImageInstance_g.
m_abProcessImageInput, &uiVarEntries, &ObdSize,
1);
ObdSize = 2;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN / ObdSize;
Ret = EplApiLinkObject(0x2011,
EplApiProcessImageInstance_g.
m_abProcessImageInput, &uiVarEntries, &ObdSize,
1);
ObdSize = 4;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN / ObdSize;
Ret = EplApiLinkObject(0x2020,
EplApiProcessImageInstance_g.
m_abProcessImageInput, &uiVarEntries, &ObdSize,
1);
ObdSize = 4;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN / ObdSize;
Ret = EplApiLinkObject(0x2021,
EplApiProcessImageInstance_g.
m_abProcessImageInput, &uiVarEntries, &ObdSize,
1);
#endif
#if EPL_API_PROCESS_IMAGE_SIZE_OUT > 0
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT;
ObdSize = 1;
Ret = EplApiLinkObject(
0x2030,
EplApiProcessImageInstance_g.m_abProcessImageOutput,
&uiVarEntries,
&ObdSize,
1);
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT;
ObdSize = 1;
Ret = EplApiLinkObject(
0x2031,
EplApiProcessImageInstance_g.m_abProcessImageOutput,
&uiVarEntries,
&ObdSize,
1);
ObdSize = 2;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT / ObdSize;
Ret = EplApiLinkObject(
0x2040,
EplApiProcessImageInstance_g.m_abProcessImageOutput,
&uiVarEntries,
&ObdSize,
1);
ObdSize = 2;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT / ObdSize;
Ret = EplApiLinkObject(
0x2041,
EplApiProcessImageInstance_g.m_abProcessImageOutput,
&uiVarEntries,
&ObdSize,
1);
ObdSize = 4;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT / ObdSize;
Ret = EplApiLinkObject(
0x2050,
EplApiProcessImageInstance_g.m_abProcessImageOutput,
&uiVarEntries,
&ObdSize,
1);
ObdSize = 4;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT / ObdSize;
Ret = EplApiLinkObject(
0x2051,
EplApiProcessImageInstance_g.m_abProcessImageOutput,
&uiVarEntries,
&ObdSize,
1);
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT;
ObdSize = 1;
Ret = EplApiLinkObject(0x2030,
EplApiProcessImageInstance_g.
m_abProcessImageOutput, &uiVarEntries, &ObdSize,
1);
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT;
ObdSize = 1;
Ret = EplApiLinkObject(0x2031,
EplApiProcessImageInstance_g.
m_abProcessImageOutput, &uiVarEntries, &ObdSize,
1);
ObdSize = 2;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT / ObdSize;
Ret = EplApiLinkObject(0x2040,
EplApiProcessImageInstance_g.
m_abProcessImageOutput, &uiVarEntries, &ObdSize,
1);
ObdSize = 2;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT / ObdSize;
Ret = EplApiLinkObject(0x2041,
EplApiProcessImageInstance_g.
m_abProcessImageOutput, &uiVarEntries, &ObdSize,
1);
ObdSize = 4;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT / ObdSize;
Ret = EplApiLinkObject(0x2050,
EplApiProcessImageInstance_g.
m_abProcessImageOutput, &uiVarEntries, &ObdSize,
1);
ObdSize = 4;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT / ObdSize;
Ret = EplApiLinkObject(0x2051,
EplApiProcessImageInstance_g.
m_abProcessImageOutput, &uiVarEntries, &ObdSize,
1);
#endif
return Ret;
return Ret;
}
//----------------------------------------------------------------------------
......@@ -310,26 +280,29 @@ tEplObdSize ObdSize;
// State:
//----------------------------------------------------------------------------
tEplKernel PUBLIC EplApiProcessImageExchangeIn(tEplApiProcessImage* pPI_p)
tEplKernel PUBLIC EplApiProcessImageExchangeIn(tEplApiProcessImage * pPI_p)
{
tEplKernel Ret = kEplSuccessful;
tEplKernel Ret = kEplSuccessful;
#if EPL_API_PROCESS_IMAGE_SIZE_IN > 0
#if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__)
copy_to_user(pPI_p->m_pImage,
EplApiProcessImageInstance_g.m_abProcessImageInput,
min(pPI_p->m_uiSize, sizeof (EplApiProcessImageInstance_g.m_abProcessImageInput)));
#else
EPL_MEMCPY(pPI_p->m_pImage,
EplApiProcessImageInstance_g.m_abProcessImageInput,
min(pPI_p->m_uiSize, sizeof (EplApiProcessImageInstance_g.m_abProcessImageInput)));
#endif
#if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__)
copy_to_user(pPI_p->m_pImage,
EplApiProcessImageInstance_g.m_abProcessImageInput,
min(pPI_p->m_uiSize,
sizeof(EplApiProcessImageInstance_g.
m_abProcessImageInput)));
#else
EPL_MEMCPY(pPI_p->m_pImage,
EplApiProcessImageInstance_g.m_abProcessImageInput,
min(pPI_p->m_uiSize,
sizeof(EplApiProcessImageInstance_g.
m_abProcessImageInput)));
#endif
#endif
return Ret;
return Ret;
}
//----------------------------------------------------------------------------
// Function: EplApiProcessImageExchangeOut()
//
......@@ -342,33 +315,33 @@ tEplKernel Ret = kEplSuccessful;
// State:
//----------------------------------------------------------------------------
tEplKernel PUBLIC EplApiProcessImageExchangeOut(tEplApiProcessImage* pPI_p)
tEplKernel PUBLIC EplApiProcessImageExchangeOut(tEplApiProcessImage * pPI_p)
{
tEplKernel Ret = kEplSuccessful;
tEplKernel Ret = kEplSuccessful;
#if EPL_API_PROCESS_IMAGE_SIZE_OUT > 0
#if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__)
copy_from_user(EplApiProcessImageInstance_g.m_abProcessImageOutput,
pPI_p->m_pImage,
min(pPI_p->m_uiSize, sizeof (EplApiProcessImageInstance_g.m_abProcessImageOutput)));
#else
EPL_MEMCPY(EplApiProcessImageInstance_g.m_abProcessImageOutput,
pPI_p->m_pImage,
min(pPI_p->m_uiSize, sizeof (EplApiProcessImageInstance_g.m_abProcessImageOutput)));
#endif
#if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__)
copy_from_user(EplApiProcessImageInstance_g.m_abProcessImageOutput,
pPI_p->m_pImage,
min(pPI_p->m_uiSize,
sizeof(EplApiProcessImageInstance_g.
m_abProcessImageOutput)));
#else
EPL_MEMCPY(EplApiProcessImageInstance_g.m_abProcessImageOutput,
pPI_p->m_pImage,
min(pPI_p->m_uiSize,
sizeof(EplApiProcessImageInstance_g.
m_abProcessImageOutput)));
#endif
#endif
return Ret;
return Ret;
}
//=========================================================================//
// //
// P R I V A T E F U N C T I O N S //
// //
//=========================================================================//
// EOF
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -96,9 +96,6 @@
// local function prototypes
//---------------------------------------------------------------------------
//=========================================================================//
// //
// P U B L I C F U N C T I O N S //
......@@ -123,7 +120,6 @@
//
//---------------------------------------------------------------------------
//=========================================================================//
// //
// P R I V A T E F U N C T I O N S //
......@@ -148,7 +144,4 @@
//
//---------------------------------------------------------------------------
// EOF
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册