Skip to content

Commit

Permalink
Staging: epl: run Lindent on *.c files
Browse files Browse the repository at this point in the history
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: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Jan 6, 2009
1 parent e0ca059 commit 833dfbe
Show file tree
Hide file tree
Showing 41 changed files with 25,374 additions and 25,583 deletions.
1,395 changes: 665 additions & 730 deletions drivers/staging/epl/Edrv8139.c

Large diffs are not rendered by default.

2,421 changes: 1,194 additions & 1,227 deletions drivers/staging/epl/EplApiGeneric.c

Large diffs are not rendered by default.

1,871 changes: 907 additions & 964 deletions drivers/staging/epl/EplApiLinuxKernel.c

Large diffs are not rendered by default.

281 changes: 127 additions & 154 deletions drivers/staging/epl/EplApiProcessImage.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
#include <asm/uaccess.h>
#endif


/***************************************************************************/
/* */
/* */
Expand All @@ -100,7 +99,6 @@
// local function prototypes
//---------------------------------------------------------------------------


/***************************************************************************/
/* */
/* */
Expand All @@ -114,7 +112,6 @@
//
/***************************************************************************/


//=========================================================================//
// //
// P R I V A T E D E F I N I T I O N S //
Expand All @@ -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()
Expand All @@ -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;
}

//----------------------------------------------------------------------------
Expand All @@ -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()
//
Expand All @@ -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

Loading

0 comments on commit 833dfbe

Please sign in to comment.