diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-23 11:14:48 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-03 14:54:20 -0700 |
commit | 563b125de36c91722f038f11da374d49de168917 (patch) | |
tree | bda2c26da532f9d296a2f8c74dc063ec6de3a6f2 /drivers/staging/epl/SharedBuff.c | |
parent | 54e49dddd0983a1f4612e1843a2b193940a4e985 (diff) |
Staging: epl: remove INLINE mess
extern inline isn't the nicest and it doesn't really make sense.
So unwind all the INLINE defines and includes, if speed is _really_ an
issue later stuff can be put back in a sane manner.
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>
Diffstat (limited to 'drivers/staging/epl/SharedBuff.c')
-rw-r--r-- | drivers/staging/epl/SharedBuff.c | 102 |
1 files changed, 36 insertions, 66 deletions
diff --git a/drivers/staging/epl/SharedBuff.c b/drivers/staging/epl/SharedBuff.c index 9fb09d6bc28..b69126cf6a7 100644 --- a/drivers/staging/epl/SharedBuff.c +++ b/drivers/staging/epl/SharedBuff.c @@ -88,6 +88,7 @@ // d.k. Linux kernel modules needs other header files for memcpy() #if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) #include <linux/string.h> +#include <linux/kernel.h> #else #include <stdio.h> #include <stdlib.h> @@ -102,8 +103,6 @@ /* */ /***************************************************************************/ -#if (!defined(SHAREDBUFF_INLINED)) || defined(INLINE_ENABLED) - //--------------------------------------------------------------------------- // Configuration //--------------------------------------------------------------------------- @@ -177,7 +176,7 @@ typedef struct { // Get pointer to Circular Shared Buffer //--------------------------------------------------------------------------- -INLINE_FUNCTION tShbCirBuff *ShbCirGetBuffer(tShbInstance pShbInstance_p) +tShbCirBuff *ShbCirGetBuffer(tShbInstance pShbInstance_p) { tShbCirBuff *pShbCirBuff; @@ -193,7 +192,7 @@ INLINE_FUNCTION tShbCirBuff *ShbCirGetBuffer(tShbInstance pShbInstance_p) // Get pointer to Linear Shared Buffer //--------------------------------------------------------------------------- -INLINE_FUNCTION tShbLinBuff *ShbLinGetBuffer(tShbInstance pShbInstance_p) +tShbLinBuff *ShbLinGetBuffer(tShbInstance pShbInstance_p) { tShbLinBuff *pShbLinBuff; @@ -210,7 +209,6 @@ int ShbCirSignalHandlerNewData(tShbInstance pShbInstance_p); void ShbCirSignalHandlerReset(tShbInstance pShbInstance_p, unsigned int fTimeOut_p); -#endif //=========================================================================// // // @@ -218,7 +216,6 @@ void ShbCirSignalHandlerReset(tShbInstance pShbInstance_p, // // //=========================================================================// -#if !defined(INLINE_ENABLED) // not inlined external functions //--------------------------------------------------------------------------- @@ -363,18 +360,13 @@ tShbError ShbCirReleaseBuffer(tShbInstance pShbInstance_p) } -#endif // !defined(INLINE_ENABLED) - -#if (!defined(SHAREDBUFF_INLINED)) || defined(INLINE_ENABLED) - //--------------------------------------------------------------------------- // Reset Circular Shared Buffer //--------------------------------------------------------------------------- -INLINE_FUNCTION tShbError ShbCirResetBuffer(tShbInstance pShbInstance_p, - unsigned long ulTimeOut_p, - tShbCirSigHndlrReset - pfnSignalHandlerReset_p) +tShbError ShbCirResetBuffer(tShbInstance pShbInstance_p, + unsigned long ulTimeOut_p, + tShbCirSigHndlrReset pfnSignalHandlerReset_p) { tShbCirBuff *pShbCirBuff; @@ -440,9 +432,9 @@ INLINE_FUNCTION tShbError ShbCirResetBuffer(tShbInstance pShbInstance_p, // Write data block to Circular Shared Buffer //--------------------------------------------------------------------------- -INLINE_FUNCTION tShbError ShbCirWriteDataBlock(tShbInstance pShbInstance_p, - const void *pSrcDataBlock_p, - unsigned long ulDataBlockSize_p) +tShbError ShbCirWriteDataBlock(tShbInstance pShbInstance_p, + const void *pSrcDataBlock_p, + unsigned long ulDataBlockSize_p) { tShbCirBuff *pShbCirBuff; @@ -608,9 +600,9 @@ INLINE_FUNCTION tShbError ShbCirWriteDataBlock(tShbInstance pShbInstance_p, // Allocate block within the Circular Shared Buffer for chunk writing //--------------------------------------------------------------------------- -INLINE_FUNCTION tShbError ShbCirAllocDataBlock(tShbInstance pShbInstance_p, - tShbCirChunk * pShbCirChunk_p, - unsigned long ulDataBufferSize_p) +tShbError ShbCirAllocDataBlock(tShbInstance pShbInstance_p, + tShbCirChunk * pShbCirChunk_p, + unsigned long ulDataBufferSize_p) { tShbCirBuff *pShbCirBuff; @@ -717,12 +709,11 @@ INLINE_FUNCTION tShbError ShbCirAllocDataBlock(tShbInstance pShbInstance_p, // Write data chunk into an allocated buffer of the Circular Shared Buffer //--------------------------------------------------------------------------- -INLINE_FUNCTION tShbError ShbCirWriteDataChunk(tShbInstance pShbInstance_p, - tShbCirChunk * pShbCirChunk_p, - const void *pSrcDataChunk_p, - unsigned long ulDataChunkSize_p, - unsigned int - *pfBufferCompleted_p) +tShbError ShbCirWriteDataChunk(tShbInstance pShbInstance_p, + tShbCirChunk *pShbCirChunk_p, + const void *pSrcDataChunk_p, + unsigned long ulDataChunkSize_p, + unsigned int *pfBufferCompleted_p) { tShbCirBuff *pShbCirBuff; @@ -857,10 +848,10 @@ INLINE_FUNCTION tShbError ShbCirWriteDataChunk(tShbInstance pShbInstance_p, // Read data block from Circular Shared Buffer //--------------------------------------------------------------------------- -INLINE_FUNCTION tShbError ShbCirReadDataBlock(tShbInstance pShbInstance_p, - void *pDstDataBlock_p, - unsigned long ulRdBuffSize_p, - unsigned long *pulDataBlockSize_p) +tShbError ShbCirReadDataBlock(tShbInstance pShbInstance_p, + void *pDstDataBlock_p, + unsigned long ulRdBuffSize_p, + unsigned long *pulDataBlockSize_p) { tShbCirBuff *pShbCirBuff; @@ -1009,9 +1000,8 @@ INLINE_FUNCTION tShbError ShbCirReadDataBlock(tShbInstance pShbInstance_p, // Get data size of next readable block from Circular Shared Buffer //--------------------------------------------------------------------------- -INLINE_FUNCTION tShbError ShbCirGetReadDataSize(tShbInstance pShbInstance_p, - unsigned long - *pulDataBlockSize_p) +tShbError ShbCirGetReadDataSize(tShbInstance pShbInstance_p, + unsigned long *pulDataBlockSize_p) { tShbCirBuff *pShbCirBuff; @@ -1070,9 +1060,8 @@ INLINE_FUNCTION tShbError ShbCirGetReadDataSize(tShbInstance pShbInstance_p, // Get number of readable blocks from Circular Shared Buffer //--------------------------------------------------------------------------- -INLINE_FUNCTION tShbError ShbCirGetReadBlockCount(tShbInstance pShbInstance_p, - unsigned long - *pulDataBlockCount_p) +tShbError ShbCirGetReadBlockCount(tShbInstance pShbInstance_p, + unsigned long *pulDataBlockCount_p) { tShbCirBuff *pShbCirBuff; @@ -1113,12 +1102,9 @@ INLINE_FUNCTION tShbError ShbCirGetReadBlockCount(tShbInstance pShbInstance_p, // d.k.: new parameter priority as enum //--------------------------------------------------------------------------- -INLINE_FUNCTION tShbError ShbCirSetSignalHandlerNewData(tShbInstance - pShbInstance_p, - tShbCirSigHndlrNewData - pfnSignalHandlerNewData_p, - tShbPriority - ShbPriority_p) +tShbError ShbCirSetSignalHandlerNewData(tShbInstance pShbInstance_p, + tShbCirSigHndlrNewData pfnSignalHandlerNewData_p, + tShbPriority ShbPriority_p) { tShbCirBuff *pShbCirBuff; @@ -1165,10 +1151,6 @@ INLINE_FUNCTION tShbError ShbCirSetSignalHandlerNewData(tShbInstance } -#endif - -#if !defined(INLINE_ENABLED) - //--------------------------------------------------------------------------- // DEBUG: Trace Circular Shared Buffer //--------------------------------------------------------------------------- @@ -1413,18 +1395,13 @@ tShbError ShbLinReleaseBuffer(tShbInstance pShbInstance_p) } -#endif // !defined(INLINE_ENABLED) - -#if (!defined(SHAREDBUFF_INLINED)) || defined(INLINE_ENABLED) - //--------------------------------------------------------------------------- // Write data block to Linear Shared Buffer //--------------------------------------------------------------------------- - -INLINE_FUNCTION tShbError ShbLinWriteDataBlock(tShbInstance pShbInstance_p, - unsigned long ulDstBufferOffs_p, - const void *pSrcDataBlock_p, - unsigned long ulDataBlockSize_p) +tShbError ShbLinWriteDataBlock(tShbInstance pShbInstance_p, + unsigned long ulDstBufferOffs_p, + const void *pSrcDataBlock_p, + unsigned long ulDataBlockSize_p) { tShbLinBuff *pShbLinBuff; @@ -1489,11 +1466,10 @@ INLINE_FUNCTION tShbError ShbLinWriteDataBlock(tShbInstance pShbInstance_p, //--------------------------------------------------------------------------- // Read data block from Linear Shared Buffer //--------------------------------------------------------------------------- - -INLINE_FUNCTION tShbError ShbLinReadDataBlock(tShbInstance pShbInstance_p, - void *pDstDataBlock_p, - unsigned long ulSrcBufferOffs_p, - unsigned long ulDataBlockSize_p) +tShbError ShbLinReadDataBlock(tShbInstance pShbInstance_p, + void *pDstDataBlock_p, + unsigned long ulSrcBufferOffs_p, + unsigned long ulDataBlockSize_p) { tShbLinBuff *pShbLinBuff; @@ -1555,10 +1531,6 @@ INLINE_FUNCTION tShbError ShbLinReadDataBlock(tShbInstance pShbInstance_p, } -#endif - -#if !defined(INLINE_ENABLED) - //--------------------------------------------------------------------------- // DEBUG: Trace Linear Shared Buffer //--------------------------------------------------------------------------- @@ -1794,6 +1766,4 @@ void ShbCirSignalHandlerReset(tShbInstance pShbInstance_p, } -#endif - // EOF |