Commit 1bfc9e15 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] drx-j: get rid of typedefs in drx_driver.h

Most of the changes were done with scripts like:
	for i in drivers/media/dvb-frontends/drx39xyj/*.[ch]; do perl -ne '$var = "drx_sig_quality"; s,\b($var)_t\s+,struct \1 ,g; s,\bp_*($var)_t\s+,struct \1 *,g; s,\b($var)_t\b,struct \1,g; s,\bp_*($var)_t\b,struct \1 *,g; print $_' <$i >a && mv a $i; done
Acked-by: default avatarDevin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent ffe7c4f9
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
static int drx39xxj_set_powerstate(struct dvb_frontend *fe, int enable) static int drx39xxj_set_powerstate(struct dvb_frontend *fe, int enable)
{ {
struct drx39xxj_state *state = fe->demodulator_priv; struct drx39xxj_state *state = fe->demodulator_priv;
drx_demod_instance_t *demod = state->demod; struct drx_demod_instance *demod = state->demod;
int result; int result;
drx_power_mode_t power_mode; enum drx_power_mode power_mode;
if (enable) if (enable)
power_mode = DRX_POWER_UP; power_mode = DRX_POWER_UP;
...@@ -55,9 +55,9 @@ static int drx39xxj_set_powerstate(struct dvb_frontend *fe, int enable) ...@@ -55,9 +55,9 @@ static int drx39xxj_set_powerstate(struct dvb_frontend *fe, int enable)
static int drx39xxj_read_status(struct dvb_frontend *fe, fe_status_t *status) static int drx39xxj_read_status(struct dvb_frontend *fe, fe_status_t *status)
{ {
struct drx39xxj_state *state = fe->demodulator_priv; struct drx39xxj_state *state = fe->demodulator_priv;
drx_demod_instance_t *demod = state->demod; struct drx_demod_instance *demod = state->demod;
int result; int result;
drx_lock_status_t lock_status; enum drx_lock_status lock_status;
*status = 0; *status = 0;
...@@ -102,9 +102,9 @@ static int drx39xxj_read_status(struct dvb_frontend *fe, fe_status_t *status) ...@@ -102,9 +102,9 @@ static int drx39xxj_read_status(struct dvb_frontend *fe, fe_status_t *status)
static int drx39xxj_read_ber(struct dvb_frontend *fe, u32 *ber) static int drx39xxj_read_ber(struct dvb_frontend *fe, u32 *ber)
{ {
struct drx39xxj_state *state = fe->demodulator_priv; struct drx39xxj_state *state = fe->demodulator_priv;
drx_demod_instance_t *demod = state->demod; struct drx_demod_instance *demod = state->demod;
int result; int result;
drx_sig_quality_t sig_quality; struct drx_sig_quality sig_quality;
result = drx_ctrl(demod, DRX_CTRL_SIG_QUALITY, &sig_quality); result = drx_ctrl(demod, DRX_CTRL_SIG_QUALITY, &sig_quality);
if (result != DRX_STS_OK) { if (result != DRX_STS_OK) {
...@@ -121,9 +121,9 @@ static int drx39xxj_read_signal_strength(struct dvb_frontend *fe, ...@@ -121,9 +121,9 @@ static int drx39xxj_read_signal_strength(struct dvb_frontend *fe,
u16 *strength) u16 *strength)
{ {
struct drx39xxj_state *state = fe->demodulator_priv; struct drx39xxj_state *state = fe->demodulator_priv;
drx_demod_instance_t *demod = state->demod; struct drx_demod_instance *demod = state->demod;
int result; int result;
drx_sig_quality_t sig_quality; struct drx_sig_quality sig_quality;
result = drx_ctrl(demod, DRX_CTRL_SIG_QUALITY, &sig_quality); result = drx_ctrl(demod, DRX_CTRL_SIG_QUALITY, &sig_quality);
if (result != DRX_STS_OK) { if (result != DRX_STS_OK) {
...@@ -140,9 +140,9 @@ static int drx39xxj_read_signal_strength(struct dvb_frontend *fe, ...@@ -140,9 +140,9 @@ static int drx39xxj_read_signal_strength(struct dvb_frontend *fe,
static int drx39xxj_read_snr(struct dvb_frontend *fe, u16 *snr) static int drx39xxj_read_snr(struct dvb_frontend *fe, u16 *snr)
{ {
struct drx39xxj_state *state = fe->demodulator_priv; struct drx39xxj_state *state = fe->demodulator_priv;
drx_demod_instance_t *demod = state->demod; struct drx_demod_instance *demod = state->demod;
int result; int result;
drx_sig_quality_t sig_quality; struct drx_sig_quality sig_quality;
result = drx_ctrl(demod, DRX_CTRL_SIG_QUALITY, &sig_quality); result = drx_ctrl(demod, DRX_CTRL_SIG_QUALITY, &sig_quality);
if (result != DRX_STS_OK) { if (result != DRX_STS_OK) {
...@@ -158,9 +158,9 @@ static int drx39xxj_read_snr(struct dvb_frontend *fe, u16 *snr) ...@@ -158,9 +158,9 @@ static int drx39xxj_read_snr(struct dvb_frontend *fe, u16 *snr)
static int drx39xxj_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) static int drx39xxj_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
{ {
struct drx39xxj_state *state = fe->demodulator_priv; struct drx39xxj_state *state = fe->demodulator_priv;
drx_demod_instance_t *demod = state->demod; struct drx_demod_instance *demod = state->demod;
int result; int result;
drx_sig_quality_t sig_quality; struct drx_sig_quality sig_quality;
result = drx_ctrl(demod, DRX_CTRL_SIG_QUALITY, &sig_quality); result = drx_ctrl(demod, DRX_CTRL_SIG_QUALITY, &sig_quality);
if (result != DRX_STS_OK) { if (result != DRX_STS_OK) {
...@@ -180,12 +180,12 @@ static int drx39xxj_set_frontend(struct dvb_frontend *fe) ...@@ -180,12 +180,12 @@ static int drx39xxj_set_frontend(struct dvb_frontend *fe)
#endif #endif
struct dtv_frontend_properties *p = &fe->dtv_property_cache; struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct drx39xxj_state *state = fe->demodulator_priv; struct drx39xxj_state *state = fe->demodulator_priv;
drx_demod_instance_t *demod = state->demod; struct drx_demod_instance *demod = state->demod;
enum drx_standard standard = DRX_STANDARD_8VSB; enum drx_standard standard = DRX_STANDARD_8VSB;
drx_channel_t channel; struct drx_channel channel;
int result; int result;
drxuio_data_t uio_data; struct drxuio_data uio_data;
drx_channel_t def_channel = { /* frequency */ 0, struct drx_channel def_channel = { /* frequency */ 0,
/* bandwidth */ DRX_BANDWIDTH_6MHZ, /* bandwidth */ DRX_BANDWIDTH_6MHZ,
/* mirror */ DRX_MIRROR_NO, /* mirror */ DRX_MIRROR_NO,
/* constellation */ DRX_CONSTELLATION_AUTO, /* constellation */ DRX_CONSTELLATION_AUTO,
...@@ -268,7 +268,7 @@ static int drx39xxj_sleep(struct dvb_frontend *fe) ...@@ -268,7 +268,7 @@ static int drx39xxj_sleep(struct dvb_frontend *fe)
static int drx39xxj_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) static int drx39xxj_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
{ {
struct drx39xxj_state *state = fe->demodulator_priv; struct drx39xxj_state *state = fe->demodulator_priv;
drx_demod_instance_t *demod = state->demod; struct drx_demod_instance *demod = state->demod;
bool i2c_gate_state; bool i2c_gate_state;
int result; int result;
...@@ -326,11 +326,11 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c) ...@@ -326,11 +326,11 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
struct drx39xxj_state *state = NULL; struct drx39xxj_state *state = NULL;
struct i2c_device_addr *demod_addr = NULL; struct i2c_device_addr *demod_addr = NULL;
drx_common_attr_t *demod_comm_attr = NULL; struct drx_common_attr *demod_comm_attr = NULL;
drxj_data_t *demod_ext_attr = NULL; drxj_data_t *demod_ext_attr = NULL;
drx_demod_instance_t *demod = NULL; struct drx_demod_instance *demod = NULL;
drxuio_cfg_t uio_cfg; struct drxuio_cfg uio_cfg;
drxuio_data_t uio_data; struct drxuio_data uio_data;
int result; int result;
/* allocate memory for the internal state */ /* allocate memory for the internal state */
...@@ -338,7 +338,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c) ...@@ -338,7 +338,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
if (state == NULL) if (state == NULL)
goto error; goto error;
demod = kmalloc(sizeof(drx_demod_instance_t), GFP_KERNEL); demod = kmalloc(sizeof(struct drx_demod_instance), GFP_KERNEL);
if (demod == NULL) if (demod == NULL)
goto error; goto error;
...@@ -346,7 +346,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c) ...@@ -346,7 +346,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
if (demod_addr == NULL) if (demod_addr == NULL)
goto error; goto error;
demod_comm_attr = kmalloc(sizeof(drx_common_attr_t), GFP_KERNEL); demod_comm_attr = kmalloc(sizeof(struct drx_common_attr), GFP_KERNEL);
if (demod_comm_attr == NULL) if (demod_comm_attr == NULL)
goto error; goto error;
...@@ -358,7 +358,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c) ...@@ -358,7 +358,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
state->i2c = i2c; state->i2c = i2c;
state->demod = demod; state->demod = demod;
memcpy(demod, &drxj_default_demod_g, sizeof(drx_demod_instance_t)); memcpy(demod, &drxj_default_demod_g, sizeof(struct drx_demod_instance));
demod->my_i2c_dev_addr = demod_addr; demod->my_i2c_dev_addr = demod_addr;
memcpy(demod->my_i2c_dev_addr, &drxj_default_addr_g, memcpy(demod->my_i2c_dev_addr, &drxj_default_addr_g,
...@@ -366,7 +366,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c) ...@@ -366,7 +366,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
demod->my_i2c_dev_addr->user_data = state; demod->my_i2c_dev_addr->user_data = state;
demod->my_common_attr = demod_comm_attr; demod->my_common_attr = demod_comm_attr;
memcpy(demod->my_common_attr, &drxj_default_comm_attr_g, memcpy(demod->my_common_attr, &drxj_default_comm_attr_g,
sizeof(drx_common_attr_t)); sizeof(struct drx_common_attr));
demod->my_common_attr->microcode = DRXJ_MC_MAIN; demod->my_common_attr->microcode = DRXJ_MC_MAIN;
#if 0 #if 0
demod->my_common_attr->verify_microcode = false; demod->my_common_attr->verify_microcode = false;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
struct drx39xxj_state { struct drx39xxj_state {
struct i2c_adapter *i2c; struct i2c_adapter *i2c;
drx_demod_instance_t *demod; struct drx_demod_instance *demod;
enum drx_standard current_standard; enum drx_standard current_standard;
struct dvb_frontend frontend; struct dvb_frontend frontend;
int powered_up:1; int powered_up:1;
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
extern "C" { extern "C" {
#endif #endif
extern drx_access_func_t drx_dap_fasi_funct_g; extern struct drx_access_func drx_dap_fasi_funct_g;
#define DRXDAP_FASI_RMW 0x10000000 #define DRXDAP_FASI_RMW 0x10000000
#define DRXDAP_FASI_BROADCAST 0x20000000 #define DRXDAP_FASI_BROADCAST 0x20000000
......
This diff is collapsed.
...@@ -489,10 +489,10 @@ TYPEDEFS ...@@ -489,10 +489,10 @@ TYPEDEFS
u16 hi_cfg_transmit; /**< HI Configure() parameter 6 */ u16 hi_cfg_transmit; /**< HI Configure() parameter 6 */
/* UIO configuartion */ /* UIO configuartion */
drxuio_mode_t uio_sma_rx_mode;/**< current mode of SmaRx pin */ enum drxuio_mode uio_sma_rx_mode;/**< current mode of SmaRx pin */
drxuio_mode_t uio_sma_tx_mode;/**< current mode of SmaTx pin */ enum drxuio_mode uio_sma_tx_mode;/**< current mode of SmaTx pin */
drxuio_mode_t uio_gpio_mode; /**< current mode of ASEL pin */ enum drxuio_mode uio_gpio_mode; /**< current mode of ASEL pin */
drxuio_mode_t uio_irqn_mode; /**< current mode of IRQN pin */ enum drxuio_mode uio_irqn_mode; /**< current mode of IRQN pin */
/* IQM fs frequecy shift and inversion */ /* IQM fs frequecy shift and inversion */
u32 iqm_fs_rate_ofs; /**< frequency shifter setting after setchannel */ u32 iqm_fs_rate_ofs; /**< frequency shifter setting after setchannel */
...@@ -531,8 +531,8 @@ TYPEDEFS ...@@ -531,8 +531,8 @@ TYPEDEFS
/* Version information */ /* Version information */
char v_text[2][12]; /**< allocated text versions */ char v_text[2][12]; /**< allocated text versions */
drx_version_t v_version[2]; /**< allocated versions structs */ struct drx_version v_version[2]; /**< allocated versions structs */
drx_version_list_t v_list_elements[2]; struct drx_version_list v_list_elements[2];
/**< allocated version list */ /**< allocated version list */
/* smart antenna configuration */ /* smart antenna configuration */
...@@ -571,7 +571,7 @@ TYPEDEFS ...@@ -571,7 +571,7 @@ TYPEDEFS
u16 oob_pre_saw; u16 oob_pre_saw;
drxj_cfg_oob_lo_power_t oob_lo_pow; drxj_cfg_oob_lo_power_t oob_lo_pow;
drx_aud_data_t aud_data; struct drx_aud_data aud_data;
/**< audio storage */ /**< audio storage */
} drxj_data_t, *pdrxj_data_t; } drxj_data_t, *pdrxj_data_t;
...@@ -723,20 +723,20 @@ STRUCTS ...@@ -723,20 +723,20 @@ STRUCTS
Exported FUNCTIONS Exported FUNCTIONS
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
int drxj_open(pdrx_demod_instance_t demod); int drxj_open(struct drx_demod_instance *demod);
int drxj_close(pdrx_demod_instance_t demod); int drxj_close(struct drx_demod_instance *demod);
int drxj_ctrl(pdrx_demod_instance_t demod, int drxj_ctrl(struct drx_demod_instance *demod,
u32 ctrl, void *ctrl_data); u32 ctrl, void *ctrl_data);
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
Exported GLOBAL VARIABLES Exported GLOBAL VARIABLES
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
extern drx_access_func_t drx_dap_drxj_funct_g; extern struct drx_access_func drx_dap_drxj_funct_g;
extern drx_demod_func_t drxj_functions_g; extern struct drx_demod_func drxj_functions_g;
extern drxj_data_t drxj_data_g; extern drxj_data_t drxj_data_g;
extern struct i2c_device_addr drxj_default_addr_g; extern struct i2c_device_addr drxj_default_addr_g;
extern drx_common_attr_t drxj_default_comm_attr_g; extern struct drx_common_attr drxj_default_comm_attr_g;
extern drx_demod_instance_t drxj_default_demod_g; extern struct drx_demod_instance drxj_default_demod_g;
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
THE END THE END
......
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