Commit 43a431e4 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Mauro Carvalho Chehab

[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
...@@ -61,13 +61,13 @@ Exported FUNCTIONS ...@@ -61,13 +61,13 @@ Exported FUNCTIONS
DRXStatus_t DRXBSP_HST_Term(void); 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 THE END
......
...@@ -42,8 +42,6 @@ ...@@ -42,8 +42,6 @@
* *
*/ */
#include <linux/kernel.h>
#ifndef __BSPI2C_H__ #ifndef __BSPI2C_H__
#define __BSPI2C_H__ #define __BSPI2C_H__
...@@ -95,11 +93,11 @@ Exported FUNCTIONS ...@@ -95,11 +93,11 @@ Exported FUNCTIONS
/** /**
* \fn DRXStatus_t DRXBSP_I2C_WriteRead( struct i2c_device_addr *wDevAddr, * \fn DRXStatus_t DRXBSP_I2C_WriteRead( struct i2c_device_addr *wDevAddr,
* u16_t wCount, * u16 wCount,
* pu8_t wData, * u8 *wData,
* struct i2c_device_addr *rDevAddr, * struct i2c_device_addr *rDevAddr,
* u16_t rCount, * u16 rCount,
* pu8_t rData) * u8 *rData)
* \brief Read and/or write count bytes from I2C bus, store them in data[]. * \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 wDevAddr The device i2c address and the device ID to write to
* \param wCount The number of bytes to write * \param wCount The number of bytes to write
...@@ -124,10 +122,10 @@ Exported FUNCTIONS ...@@ -124,10 +122,10 @@ Exported FUNCTIONS
* It can be used to control a "switch" on the I2C bus to the correct device. * 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, DRXStatus_t DRXBSP_I2C_WriteRead(struct i2c_device_addr *wDevAddr,
u16_t wCount, u16 wCount,
pu8_t wData, u8 *wData,
struct i2c_device_addr *rDevAddr, struct i2c_device_addr *rDevAddr,
u16_t rCount, pu8_t rData); u16 rCount, u8 *rData);
/** /**
* \fn DRXBSP_I2C_ErrorText() * \fn DRXBSP_I2C_ErrorText()
......
...@@ -79,8 +79,8 @@ DEFINES ...@@ -79,8 +79,8 @@ DEFINES
TYPEDEFS TYPEDEFS
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
typedef u32_t TUNERMode_t; typedef u32 TUNERMode_t;
typedef pu32_t pTUNERMode_t; typedef u32 *pTUNERMode_t;
typedef char *TUNERSubMode_t; /* description of submode */ typedef char *TUNERSubMode_t; /* description of submode */
typedef TUNERSubMode_t *pTUNERSubMode_t; typedef TUNERSubMode_t *pTUNERSubMode_t;
...@@ -97,9 +97,9 @@ TYPEDEFS ...@@ -97,9 +97,9 @@ TYPEDEFS
DRXFrequency_t minFreqRF; /* Lowest RF input frequency, in kHz */ DRXFrequency_t minFreqRF; /* Lowest RF input frequency, in kHz */
DRXFrequency_t maxFreqRF; /* Highest 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 */ 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 /* The following fields will be either 0, NULL or FALSE and do not need
initialisation */ initialisation */
...@@ -109,7 +109,7 @@ TYPEDEFS ...@@ -109,7 +109,7 @@ TYPEDEFS
DRXFrequency_t IFfrequency; /* only valid if programmed */ DRXFrequency_t IFfrequency; /* only valid if programmed */
void *myUserData; /* pointer to associated demod instance */ 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; } TUNERCommonAttr_t, *pTUNERCommonAttr_t;
...@@ -139,11 +139,11 @@ TYPEDEFS ...@@ -139,11 +139,11 @@ TYPEDEFS
typedef DRXStatus_t(*TUNERi2cWriteReadFunc_t) (pTUNERInstance_t tuner, typedef DRXStatus_t(*TUNERi2cWriteReadFunc_t) (pTUNERInstance_t tuner,
struct i2c_device_addr * struct i2c_device_addr *
wDevAddr, u16_t wCount, wDevAddr, u16 wCount,
pu8_t wData, u8 *wData,
struct i2c_device_addr * struct i2c_device_addr *
rDevAddr, u16_t rCount, rDevAddr, u16 rCount,
pu8_t rData); u8 *rData);
typedef struct { typedef struct {
TUNEROpenFunc_t openFunc; TUNEROpenFunc_t openFunc;
...@@ -194,10 +194,10 @@ Exported FUNCTIONS ...@@ -194,10 +194,10 @@ Exported FUNCTIONS
DRXStatus_t DRXBSP_TUNER_DefaultI2CWriteRead(pTUNERInstance_t tuner, DRXStatus_t DRXBSP_TUNER_DefaultI2CWriteRead(pTUNERInstance_t tuner,
struct i2c_device_addr *wDevAddr, struct i2c_device_addr *wDevAddr,
u16_t wCount, u16 wCount,
pu8_t wData, u8 *wData,
struct i2c_device_addr *rDevAddr, struct i2c_device_addr *rDevAddr,
u16_t rCount, pu8_t rData); u16 rCount, u8 *rData);
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
THE END THE END
......
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
* *
*/ */
#include <linux/kernel.h>
#ifndef __BSP_TYPES_H__ #ifndef __BSP_TYPES_H__
#define __BSP_TYPES_H__ #define __BSP_TYPES_H__
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
...@@ -53,98 +55,10 @@ TYPEDEFS ...@@ -53,98 +55,10 @@ TYPEDEFS
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
/** /**
* \typedef unsigned char u8_t * \typedef s32 DRXFrequency_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
* \brief type definition of frequency * \brief type definition of frequency
*/ */
typedef s32_t DRXFrequency_t; typedef s32 DRXFrequency_t;
/** /**
* \typedef DRXFrequency_t *pDRXFrequency_t * \typedef DRXFrequency_t *pDRXFrequency_t
...@@ -153,10 +67,10 @@ TYPEDEFS ...@@ -153,10 +67,10 @@ TYPEDEFS
typedef DRXFrequency_t *pDRXFrequency_t; typedef DRXFrequency_t *pDRXFrequency_t;
/** /**
* \typedef u32_t DRXSymbolrate_t * \typedef u32 DRXSymbolrate_t
* \brief type definition of symbol rate * \brief type definition of symbol rate
*/ */
typedef u32_t DRXSymbolrate_t; typedef u32 DRXSymbolrate_t;
/** /**
* \typedef DRXSymbolrate_t *pDRXSymbolrate_t * \typedef DRXSymbolrate_t *pDRXSymbolrate_t
......
...@@ -39,32 +39,32 @@ DRXBSP_TUNER_GetFrequency(pTUNERInstance_t tuner, ...@@ -39,32 +39,32 @@ DRXBSP_TUNER_GetFrequency(pTUNERInstance_t tuner,
return DRX_STS_OK; return DRX_STS_OK;
} }
DRXStatus_t DRXBSP_HST_Sleep(u32_t n) DRXStatus_t DRXBSP_HST_Sleep(u32 n)
{ {
msleep(n); msleep(n);
return DRX_STS_OK; return DRX_STS_OK;
} }
u32_t DRXBSP_HST_Clock(void) u32 DRXBSP_HST_Clock(void)
{ {
return jiffies_to_msecs(jiffies); 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)); 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)); return (memcpy(to, from, (size_t) n));
} }
DRXStatus_t DRXBSP_I2C_WriteRead(struct i2c_device_addr *wDevAddr, DRXStatus_t DRXBSP_I2C_WriteRead(struct i2c_device_addr *wDevAddr,
u16_t wCount, u16 wCount,
pu8_t wData, u8 *wData,
struct i2c_device_addr *rDevAddr, struct i2c_device_addr *rDevAddr,
u16_t rCount, pu8_t rData) u16 rCount, u8 *rData)
{ {
struct drx39xxj_state *state; struct drx39xxj_state *state;
struct i2c_msg msg[2]; struct i2c_msg msg[2];
......
This diff is collapsed.
This diff is collapsed.
...@@ -41,9 +41,9 @@ ...@@ -41,9 +41,9 @@
#ifndef __DRXJ_MC_MAIN_H__ #ifndef __DRXJ_MC_MAIN_H__
#define __DRXJ_MC_MAIN_H__ #define __DRXJ_MC_MAIN_H__
#define DRXJ_MC_MAIN ((pu8_t) drxj_mc_main_g) #define DRXJ_MC_MAIN ((u8 *) drxj_mc_main_g)
const u8_t drxj_mc_main_g[] = { const u8 drxj_mc_main_g[] = {
0x48, 0x4c, 0x00, 0x06, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x00, 0x08, 0x48, 0x4c, 0x00, 0x06, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x00, 0x08,
0x00, 0x00, 0x01, 0x07, 0x00, 0x00, 0x01, 0x07,
0x00, 0x00, 0x1f, 0xf0, 0x00, 0x01, 0xdd, 0x81, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x01, 0xdd, 0x81, 0x00, 0x40, 0x0a, 0x00,
......
...@@ -41,9 +41,9 @@ ...@@ -41,9 +41,9 @@
#ifndef __DRXJ_MC_VSB_H__ #ifndef __DRXJ_MC_VSB_H__
#define __DRXJ_MC_VSB_H__ #define __DRXJ_MC_VSB_H__
#define DRXJ_MC_VSB ((pu8_t) drxj_mc_vsb_g) #define DRXJ_MC_VSB ((u8 *) drxj_mc_vsb_g)
const u8_t drxj_mc_vsb_g[] = { const u8 drxj_mc_vsb_g[] = {
0x48, 0x4c, 0x00, 0x03, 0x00, 0x00, 0x2b, 0x62, 0x00, 0x00, 0x00, 0x08, 0x48, 0x4c, 0x00, 0x03, 0x00, 0x00, 0x2b, 0x62, 0x00, 0x00, 0x00, 0x08,
0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x82,
0x00, 0x00, 0x15, 0x9e, 0x00, 0x01, 0x92, 0x3b, 0x2a, 0x02, 0xe4, 0xf8, 0x00, 0x00, 0x15, 0x9e, 0x00, 0x01, 0x92, 0x3b, 0x2a, 0x02, 0xe4, 0xf8,
......
...@@ -42,9 +42,9 @@ ...@@ -42,9 +42,9 @@
#ifndef __DRXJ_MC_VSBQAM_H__ #ifndef __DRXJ_MC_VSBQAM_H__
#define __DRXJ_MC_VSBQAM_H__ #define __DRXJ_MC_VSBQAM_H__
#define DRXJ_MC_VSBQAM ((pu8_t) drxj_mc_vsbqam_g) #define DRXJ_MC_VSBQAM ((u8 *) drxj_mc_vsbqam_g)
const u8_t drxj_mc_vsbqam_g[] = { const u8 drxj_mc_vsbqam_g[] = {
0x48, 0x4c, 0x00, 0x04, 0x00, 0x00, 0x56, 0xa0, 0x00, 0x00, 0x00, 0x08, 0x48, 0x4c, 0x00, 0x04, 0x00, 0x00, 0x56, 0xa0, 0x00, 0x00, 0x00, 0x08,
0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x82,
0x00, 0x00, 0x20, 0x00, 0x00, 0x01, 0xc4, 0x4d, 0x55, 0x02, 0xe4, 0xee, 0x00, 0x00, 0x20, 0x00, 0x00, 0x01, 0xc4, 0x4d, 0x55, 0x02, 0xe4, 0xee,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment