Commit 43a431e4 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] drx-j: get rid of the integer typedefs



Patch created using this small script:

for j in 8 16 32; do for i in *; do sed s,pu${j}_t,"u$j *",g <$i >a && mv a $i; done; done
for j in 8 16 32; do for i in *; do sed s,ps${j}_t,"s$j *",g <$i >a && mv a $i; done; done
for j in 8 16 32; do for i in *; do sed s,s${j}_t,"s$j",g <$i >a && mv a $i; done; done
for j in 8 16 32; do for i in *; do sed s,u${j}_t,"u$j",g <$i >a && mv a $i; done; done

and fixing the bsp_types.h header.

Acked-by: default avatarDevin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent bab3fcca
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -61,13 +61,13 @@ Exported FUNCTIONS

	DRXStatus_t DRXBSP_HST_Term(void);

	void *DRXBSP_HST_Memcpy(void *to, void *from, u32_t n);
	void *DRXBSP_HST_Memcpy(void *to, void *from, u32 n);

	int DRXBSP_HST_Memcmp(void *s1, void *s2, u32_t n);
	int DRXBSP_HST_Memcmp(void *s1, void *s2, u32 n);

	u32_t DRXBSP_HST_Clock(void);
	u32 DRXBSP_HST_Clock(void);

	DRXStatus_t DRXBSP_HST_Sleep(u32_t n);
	DRXStatus_t DRXBSP_HST_Sleep(u32 n);

/*-------------------------------------------------------------------------
THE END
+7 −9
Original line number Diff line number Diff line
@@ -42,8 +42,6 @@
*
*/

#include <linux/kernel.h>

#ifndef __BSPI2C_H__
#define __BSPI2C_H__

@@ -95,11 +93,11 @@ Exported FUNCTIONS

/**
* \fn DRXStatus_t DRXBSP_I2C_WriteRead( struct i2c_device_addr *wDevAddr,
*                                       u16_t wCount,
*                                       pu8_t wData,
*                                       u16 wCount,
*                                       u8 *wData,
*                                       struct i2c_device_addr *rDevAddr,
*                                       u16_t rCount,
*                                       pu8_t rData)
*                                       u16 rCount,
*                                       u8 *rData)
* \brief Read and/or write count bytes from I2C bus, store them in data[].
* \param wDevAddr The device i2c address and the device ID to write to
* \param wCount   The number of bytes to write
@@ -124,10 +122,10 @@ Exported FUNCTIONS
* It can be used to control a "switch" on the I2C bus to the correct device.
*/
	DRXStatus_t DRXBSP_I2C_WriteRead(struct i2c_device_addr *wDevAddr,
					 u16_t wCount,
					 pu8_t wData,
					 u16 wCount,
					 u8 *wData,
					 struct i2c_device_addr *rDevAddr,
					 u16_t rCount, pu8_t rData);
					 u16 rCount, u8 *rData);

/**
* \fn DRXBSP_I2C_ErrorText()
+12 −12
Original line number Diff line number Diff line
@@ -79,8 +79,8 @@ DEFINES
TYPEDEFS
------------------------------------------------------------------------------*/

	typedef u32_t TUNERMode_t;
	typedef pu32_t pTUNERMode_t;
	typedef u32 TUNERMode_t;
	typedef u32 *pTUNERMode_t;

	typedef char *TUNERSubMode_t;	/* description of submode */
	typedef TUNERSubMode_t *pTUNERSubMode_t;
@@ -97,9 +97,9 @@ TYPEDEFS
		DRXFrequency_t minFreqRF;	/* Lowest  RF input frequency, in kHz */
		DRXFrequency_t maxFreqRF;	/* Highest RF input frequency, in kHz */

		u8_t subMode;	/* Index to sub-mode in use */
		u8 subMode;	/* Index to sub-mode in use */
		pTUNERSubMode_t subModeDescriptions;	/* Pointer to description of sub-modes */
		u8_t subModes;	/* Number of available sub-modes      */
		u8 subModes;	/* Number of available sub-modes      */

		/* The following fields will be either 0, NULL or FALSE and do not need
		   initialisation */
@@ -109,7 +109,7 @@ TYPEDEFS
		DRXFrequency_t IFfrequency;	/* only valid if programmed       */

		void *myUserData;	/* pointer to associated demod instance */
		u16_t myCapabilities;	/* value for storing application flags  */
		u16 myCapabilities;	/* value for storing application flags  */

	} TUNERCommonAttr_t, *pTUNERCommonAttr_t;

@@ -139,11 +139,11 @@ TYPEDEFS

	typedef DRXStatus_t(*TUNERi2cWriteReadFunc_t) (pTUNERInstance_t tuner,
						       struct i2c_device_addr *
						       wDevAddr, u16_t wCount,
						       pu8_t wData,
						       wDevAddr, u16 wCount,
						       u8 *wData,
						       struct i2c_device_addr *
						       rDevAddr, u16_t rCount,
						       pu8_t rData);
						       rDevAddr, u16 rCount,
						       u8 *rData);

	typedef struct {
		TUNEROpenFunc_t openFunc;
@@ -194,10 +194,10 @@ Exported FUNCTIONS

	DRXStatus_t DRXBSP_TUNER_DefaultI2CWriteRead(pTUNERInstance_t tuner,
						     struct i2c_device_addr *wDevAddr,
						     u16_t wCount,
						     pu8_t wData,
						     u16 wCount,
						     u8 *wData,
						     struct i2c_device_addr *rDevAddr,
						     u16_t rCount, pu8_t rData);
						     u16 rCount, u8 *rData);

/*------------------------------------------------------------------------------
THE END
+6 −92
Original line number Diff line number Diff line
@@ -39,6 +39,8 @@
*
*/

#include <linux/kernel.h>

#ifndef __BSP_TYPES_H__
#define __BSP_TYPES_H__
/*-------------------------------------------------------------------------
@@ -53,98 +55,10 @@ TYPEDEFS
-------------------------------------------------------------------------*/

/**
* \typedef unsigned char u8_t
* \brief type definition of an unsigned 8 bits integer
*/
	typedef unsigned char u8_t;
/**
* \typedef char s8_t
* \brief type definition of a signed 8 bits integer
*/
	typedef char s8_t;
/**
* \typedef unsigned short u16_t *pu16_t
* \brief type definition of an unsigned 16 bits integer
*/
	typedef unsigned short u16_t;
/**
* \typedef short s16_t
* \brief type definition of a signed 16 bits integer
*/
	typedef short s16_t;
/**
* \typedef unsigned long u32_t
* \brief type definition of an unsigned 32 bits integer
*/
	typedef unsigned long u32_t;
/**
* \typedef long s32_t
* \brief type definition of a signed 32 bits integer
*/
	typedef long s32_t;
/*
* \typedef struct ... u64_t
* \brief type definition of an usigned 64 bits integer
*/
	typedef struct {
		u32_t MSLW;
		u32_t LSLW;
	} u64_t;
/*
* \typedef struct ... i64_t
* \brief type definition of a signed 64 bits integer
*/
	typedef struct {
		s32_t MSLW;
		u32_t LSLW;
	} s64_t;

/**
* \typedef u8_t *pu8_t
* \brief type definition of pointer to an unsigned 8 bits integer
*/
	typedef u8_t *pu8_t;
/**
* \typedef s8_t *ps8_t
* \brief type definition of pointer to a signed 8 bits integer
*/
	typedef s8_t *ps8_t;
/**
* \typedef u16_t *pu16_t
* \brief type definition of pointer to an unsigned 16 bits integer
*/
	typedef u16_t *pu16_t;
/**
* \typedef s16_t *ps16_t
* \brief type definition of pointer to a signed 16 bits integer
*/
	typedef s16_t *ps16_t;
/**
* \typedef u32_t *pu32_t
* \brief type definition of pointer to an unsigned 32 bits integer
*/
	typedef u32_t *pu32_t;
/**
* \typedef s32_t *ps32_t
* \brief type definition of pointer to a signed 32 bits integer
*/
	typedef s32_t *ps32_t;
/**
* \typedef u64_t *pu64_t
* \brief type definition of pointer to an usigned 64 bits integer
*/
	typedef u64_t *pu64_t;
/**
* \typedef s64_t *ps64_t
* \brief type definition of pointer to a signed 64 bits integer
*/
	typedef s64_t *ps64_t;

/**
* \typedef s32_t DRXFrequency_t
* \typedef s32 DRXFrequency_t
* \brief type definition of frequency
*/
	typedef s32_t DRXFrequency_t;
	typedef s32 DRXFrequency_t;

/**
* \typedef DRXFrequency_t *pDRXFrequency_t
@@ -153,10 +67,10 @@ TYPEDEFS
	typedef DRXFrequency_t *pDRXFrequency_t;

/**
* \typedef u32_t DRXSymbolrate_t
* \typedef u32 DRXSymbolrate_t
* \brief type definition of symbol rate
*/
	typedef u32_t DRXSymbolrate_t;
	typedef u32 DRXSymbolrate_t;

/**
* \typedef DRXSymbolrate_t *pDRXSymbolrate_t
+7 −7
Original line number Diff line number Diff line
@@ -39,32 +39,32 @@ DRXBSP_TUNER_GetFrequency(pTUNERInstance_t tuner,
	return DRX_STS_OK;
}

DRXStatus_t DRXBSP_HST_Sleep(u32_t n)
DRXStatus_t DRXBSP_HST_Sleep(u32 n)
{
	msleep(n);
	return DRX_STS_OK;
}

u32_t DRXBSP_HST_Clock(void)
u32 DRXBSP_HST_Clock(void)
{
	return jiffies_to_msecs(jiffies);
}

int DRXBSP_HST_Memcmp(void *s1, void *s2, u32_t n)
int DRXBSP_HST_Memcmp(void *s1, void *s2, u32 n)
{
	return (memcmp(s1, s2, (size_t) n));
}

void *DRXBSP_HST_Memcpy(void *to, void *from, u32_t n)
void *DRXBSP_HST_Memcpy(void *to, void *from, u32 n)
{
	return (memcpy(to, from, (size_t) n));
}

DRXStatus_t DRXBSP_I2C_WriteRead(struct i2c_device_addr *wDevAddr,
				 u16_t wCount,
				 pu8_t wData,
				 u16 wCount,
				 u8 *wData,
				 struct i2c_device_addr *rDevAddr,
				 u16_t rCount, pu8_t rData)
				 u16 rCount, u8 *rData)
{
	struct drx39xxj_state *state;
	struct i2c_msg msg[2];
Loading