Commit 22892268 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] drx-j: do more CodingStyle fixes

This time, use checkpatch --strict --fix.
Acked-by: default avatarDevin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 57afe2f0
......@@ -376,7 +376,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
demod->my_ext_attr = demod_ext_attr;
memcpy(demod->my_ext_attr, &drxj_data_g, sizeof(drxj_data_t));
((drxj_data_t *) demod->my_ext_attr)->uio_sma_tx_mode =
((drxj_data_t *)demod->my_ext_attr)->uio_sma_tx_mode =
DRX_UIO_MODE_READWRITE;
demod->my_tuner = NULL;
......
......@@ -35,6 +35,6 @@ struct drx39xxj_state {
unsigned int i2c_gate_open:1;
};
extern struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c);
struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c);
#endif /* DVB_DUMMY_FE_H */
......@@ -30,7 +30,7 @@ int drxbsp_tuner_set_frequency(struct tuner_instance *tuner,
int
drxbsp_tuner_get_frequency(struct tuner_instance *tuner,
u32 mode,
u32 mode,
s32 *r_ffrequency,
s32 *i_ffrequency)
{
......
......@@ -252,8 +252,8 @@ static int drxdap_fasi_read_block(struct i2c_device_addr *dev_addr,
addr &= ~DRXDAP_FASI_FLAGS;
addr |= flags;
#if (( DRXDAPFASI_LONG_ADDR_ALLOWED == 1) && \
(DRXDAPFASI_SHORT_ADDR_ALLOWED == 1) )
#if ((DRXDAPFASI_LONG_ADDR_ALLOWED == 1) && \
(DRXDAPFASI_SHORT_ADDR_ALLOWED == 1))
/* short format address preferred but long format otherwise */
if (DRXDAP_FASI_LONG_FORMAT(addr)) {
#endif
......@@ -263,8 +263,8 @@ static int drxdap_fasi_read_block(struct i2c_device_addr *dev_addr,
buf[bufx++] = (u8) ((addr >> 24) & 0xFF);
buf[bufx++] = (u8) ((addr >> 7) & 0xFF);
#endif
#if (( DRXDAPFASI_LONG_ADDR_ALLOWED == 1) && \
(DRXDAPFASI_SHORT_ADDR_ALLOWED == 1) )
#if ((DRXDAPFASI_LONG_ADDR_ALLOWED == 1) && \
(DRXDAPFASI_SHORT_ADDR_ALLOWED == 1))
} else {
#endif
#if (DRXDAPFASI_SHORT_ADDR_ALLOWED == 1)
......@@ -273,8 +273,8 @@ static int drxdap_fasi_read_block(struct i2c_device_addr *dev_addr,
(u8) (((addr >> 16) & 0x0F) |
((addr >> 18) & 0xF0));
#endif
#if (( DRXDAPFASI_LONG_ADDR_ALLOWED == 1) && \
(DRXDAPFASI_SHORT_ADDR_ALLOWED == 1) )
#if ((DRXDAPFASI_LONG_ADDR_ALLOWED == 1) && \
(DRXDAPFASI_SHORT_ADDR_ALLOWED == 1))
}
#endif
......@@ -478,8 +478,8 @@ static int drxdap_fasi_write_block(struct i2c_device_addr *dev_addr,
/* Buffer device address */
addr &= ~DRXDAP_FASI_FLAGS;
addr |= flags;
#if (( (DRXDAPFASI_LONG_ADDR_ALLOWED) == 1) && \
((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1) )
#if (((DRXDAPFASI_LONG_ADDR_ALLOWED) == 1) && \
((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1))
/* short format address preferred but long format otherwise */
if (DRXDAP_FASI_LONG_FORMAT(addr)) {
#endif
......@@ -489,8 +489,8 @@ static int drxdap_fasi_write_block(struct i2c_device_addr *dev_addr,
buf[bufx++] = (u8) ((addr >> 24) & 0xFF);
buf[bufx++] = (u8) ((addr >> 7) & 0xFF);
#endif
#if (( (DRXDAPFASI_LONG_ADDR_ALLOWED) == 1) && \
((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1) )
#if (((DRXDAPFASI_LONG_ADDR_ALLOWED) == 1) && \
((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1))
} else {
#endif
#if ((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1)
......@@ -499,8 +499,8 @@ static int drxdap_fasi_write_block(struct i2c_device_addr *dev_addr,
(u8) (((addr >> 16) & 0x0F) |
((addr >> 18) & 0xF0));
#endif
#if (( (DRXDAPFASI_LONG_ADDR_ALLOWED) == 1) && \
((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1) )
#if (((DRXDAPFASI_LONG_ADDR_ALLOWED) == 1) && \
((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1))
}
#endif
......@@ -526,8 +526,8 @@ static int drxdap_fasi_write_block(struct i2c_device_addr *dev_addr,
st = drxbsp_i2c_write_read(dev_addr,
(u16) (bufx),
buf,
(struct i2c_device_addr *) (NULL),
0, (u8 *) (NULL));
(struct i2c_device_addr *)(NULL),
0, (u8 *)(NULL));
if ((st != DRX_STS_OK) && (first_err == DRX_STS_OK)) {
/* at the end, return the first error encountered */
......@@ -543,8 +543,8 @@ static int drxdap_fasi_write_block(struct i2c_device_addr *dev_addr,
st = drxbsp_i2c_write_read(dev_addr,
(u16) (bufx + todo),
buf,
(struct i2c_device_addr *) (NULL),
0, (u8 *) (NULL));
(struct i2c_device_addr *)(NULL),
0, (u8 *)(NULL));
if ((st != DRX_STS_OK) && (first_err == DRX_STS_OK)) {
/* at the end, return the first error encountered */
......
......@@ -93,8 +93,8 @@
#endif
/* check */
#if (( DRXDAPFASI_LONG_ADDR_ALLOWED == 0) && \
(DRXDAPFASI_SHORT_ADDR_ALLOWED == 0) )
#if ((DRXDAPFASI_LONG_ADDR_ALLOWED == 0) && \
(DRXDAPFASI_SHORT_ADDR_ALLOWED == 0))
#error At least one of short- or long-addressing format must be allowed.
*; /* illegal statement to force compiler error */
#endif
......
......@@ -99,7 +99,7 @@ DEFINES
/*=== MACROS =================================================================*/
/*============================================================================*/
#define DRX_ISPOWERDOWNMODE(mode) ( ( mode == DRX_POWER_MODE_9 ) || \
#define DRX_ISPOWERDOWNMODE(mode) (( mode == DRX_POWER_MODE_9) || \
(mode == DRX_POWER_MODE_10) || \
(mode == DRX_POWER_MODE_11) || \
(mode == DRX_POWER_MODE_12) || \
......@@ -107,7 +107,7 @@ DEFINES
(mode == DRX_POWER_MODE_14) || \
(mode == DRX_POWER_MODE_15) || \
(mode == DRX_POWER_MODE_16) || \
(mode == DRX_POWER_DOWN) )
(mode == DRX_POWER_DOWN))
/*------------------------------------------------------------------------------
GLOBAL VARIABLES
......@@ -147,7 +147,7 @@ FUNCTIONS
/* Prototype of default scanning function */
static int
scan_function_default(void *scan_context,
drx_scan_command_t scan_command,
drx_scan_command_t scan_command,
pdrx_channel_t scan_channel, bool *get_next_channel);
/**
......@@ -355,7 +355,7 @@ scan_prepare_next_scan(pdrx_demod_instance_t demod, s32 skip)
*/
static int
scan_function_default(void *scan_context,
drx_scan_command_t scan_command,
drx_scan_command_t scan_command,
pdrx_channel_t scan_channel, bool *get_next_channel)
{
pdrx_demod_instance_t demod = NULL;
......@@ -604,7 +604,7 @@ static int ctrl_scan_stop(pdrx_demod_instance_t demod)
static int ctrl_scan_next(pdrx_demod_instance_t demod, u16 *scan_progress)
{
pdrx_common_attr_t common_attr = (pdrx_common_attr_t) (NULL);
bool *scan_ready = (bool *) (NULL);
bool *scan_ready = (bool *)(NULL);
u16 max_progress = DRX_SCAN_MAX_PROGRESS;
u32 num_tries = 0;
u32 i = 0;
......@@ -983,14 +983,14 @@ static u16 u_code_compute_crc(u8 *block_data, u16 nr_words)
*/
static int
ctrl_u_code(pdrx_demod_instance_t demod,
p_drxu_code_info_t mc_info, drxu_code_action_t action)
p_drxu_code_info_t mc_info, drxu_code_action_t action)
{
int rc;
u16 i = 0;
u16 mc_nr_of_blks = 0;
u16 mc_magic_word = 0;
u8 *mc_data = (u8 *) (NULL);
struct i2c_device_addr *dev_addr = (struct i2c_device_addr *) (NULL);
u8 *mc_data = (u8 *)(NULL);
struct i2c_device_addr *dev_addr = (struct i2c_device_addr *)(NULL);
dev_addr = demod->my_i2c_dev_addr;
......@@ -1420,7 +1420,7 @@ drx_ctrl(pdrx_demod_instance_t demod, u32 ctrl, void *ctrl_data)
/*======================================================================*/
case DRX_CTRL_VERSION:
return ctrl_version(demod, (p_drx_version_list_t *) ctrl_data);
return ctrl_version(demod, (p_drx_version_list_t *)ctrl_data);
break;
/*======================================================================*/
......@@ -1463,7 +1463,7 @@ drx_ctrl(pdrx_demod_instance_t demod, u32 ctrl, void *ctrl_data)
/*===================================================================*/
case DRX_CTRL_SCAN_NEXT:
{
return ctrl_scan_next(demod, (u16 *) ctrl_data);
return ctrl_scan_next(demod, (u16 *)ctrl_data);
}
break;
......
......@@ -493,23 +493,23 @@ MACROS
/**
* \brief Macro to sign extend signed 9 bit value to signed 16 bit value
*/
#define DRX_S9TOS16(x) ((((u16)x)&0x100)?((s16)((u16)(x)|0xFF00)):(x))
#define DRX_S9TOS16(x) ((((u16)x)&0x100) ? ((s16)((u16)(x)|0xFF00)) : (x))
/**
* \brief Macro to sign extend signed 9 bit value to signed 16 bit value
*/
#define DRX_S24TODRXFREQ(x) (( ( (u32) x) & 0x00800000UL ) ? \
#define DRX_S24TODRXFREQ(x) ((( (u32) x) & 0x00800000UL) ? \
((s32) \
(( (u32) x) | 0xFF000000 ) ) : \
((s32) x) )
(((u32) x) | 0xFF000000) ) : \
((s32) x))
/**
* \brief Macro to convert 16 bit register value to a s32
*/
#define DRX_U16TODRXFREQ(x) (( x & 0x8000) ? \
#define DRX_U16TODRXFREQ(x) ((x & 0x8000) ? \
((s32) \
(( (u32) x) | 0xFFFF0000 ) ) : \
((s32) x) )
(((u32) x) | 0xFFFF0000) ) : \
((s32) x))
/*-------------------------------------------------------------------------
ENUM
......@@ -2868,14 +2868,14 @@ Access macros
#define DRX_GET_PRESET(d, x) \
DRX_ACCESSMACRO_GET((d), (x), DRX_XS_CFG_PRESET, char*, "ERROR")
#define DRX_SET_AUD_BTSC_DETECT(d, x) DRX_ACCESSMACRO_SET( (d), (x), \
#define DRX_SET_AUD_BTSC_DETECT(d, x) DRX_ACCESSMACRO_SET((d), (x), \
DRX_XS_CFG_AUD_BTSC_DETECT, drx_aud_btsc_detect_t)
#define DRX_GET_AUD_BTSC_DETECT(d, x) DRX_ACCESSMACRO_GET( (d), (x), \
#define DRX_GET_AUD_BTSC_DETECT(d, x) DRX_ACCESSMACRO_GET((d), (x), \
DRX_XS_CFG_AUD_BTSC_DETECT, drx_aud_btsc_detect_t, DRX_UNKNOWN)
#define DRX_SET_QAM_LOCKRANGE(d, x) DRX_ACCESSMACRO_SET( (d), (x), \
#define DRX_SET_QAM_LOCKRANGE(d, x) DRX_ACCESSMACRO_SET((d), (x), \
DRX_XS_CFG_QAM_LOCKRANGE, drx_qam_lock_range_t)
#define DRX_GET_QAM_LOCKRANGE(d, x) DRX_ACCESSMACRO_GET( (d), (x), \
#define DRX_GET_QAM_LOCKRANGE(d, x) DRX_ACCESSMACRO_GET((d), (x), \
DRX_XS_CFG_QAM_LOCKRANGE, drx_qam_lock_range_t, DRX_UNKNOWN)
/**
......@@ -2883,20 +2883,20 @@ Access macros
* \retval true std is an ATV standard
* \retval false std is an ATV standard
*/
#define DRX_ISATVSTD(std) ( ( (std) == DRX_STANDARD_PAL_SECAM_BG ) || \
#define DRX_ISATVSTD(std) (( (std) == DRX_STANDARD_PAL_SECAM_BG) || \
((std) == DRX_STANDARD_PAL_SECAM_DK) || \
((std) == DRX_STANDARD_PAL_SECAM_I) || \
((std) == DRX_STANDARD_PAL_SECAM_L) || \
((std) == DRX_STANDARD_PAL_SECAM_LP) || \
((std) == DRX_STANDARD_NTSC) || \
((std) == DRX_STANDARD_FM) )
((std) == DRX_STANDARD_FM))
/**
* \brief Macro to check if std is an QAM standard
* \retval true std is an QAM standards
* \retval false std is an QAM standards
*/
#define DRX_ISQAMSTD(std) ( ( (std) == DRX_STANDARD_ITU_A ) || \
#define DRX_ISQAMSTD(std) (( (std) == DRX_STANDARD_ITU_A) || \
((std) == DRX_STANDARD_ITU_B) || \
((std) == DRX_STANDARD_ITU_C) || \
((std) == DRX_STANDARD_ITU_D))
......@@ -2906,14 +2906,14 @@ Access macros
* \retval true std is VSB standard
* \retval false std is not VSB standard
*/
#define DRX_ISVSBSTD(std) ( (std) == DRX_STANDARD_8VSB )
#define DRX_ISVSBSTD(std) ((std) == DRX_STANDARD_8VSB)
/**
* \brief Macro to check if std is DVBT standard
* \retval true std is DVBT standard
* \retval false std is not DVBT standard
*/
#define DRX_ISDVBTSTD(std) ( (std) == DRX_STANDARD_DVBT )
#define DRX_ISDVBTSTD(std) ((std) == DRX_STANDARD_DVBT)
/*-------------------------------------------------------------------------
Exported FUNCTIONS
......
This diff is collapsed.
......@@ -723,9 +723,9 @@ STRUCTS
Exported FUNCTIONS
-------------------------------------------------------------------------*/
extern int drxj_open(pdrx_demod_instance_t demod);
extern int drxj_close(pdrx_demod_instance_t demod);
extern int drxj_ctrl(pdrx_demod_instance_t demod,
int drxj_open(pdrx_demod_instance_t demod);
int drxj_close(pdrx_demod_instance_t demod);
int drxj_ctrl(pdrx_demod_instance_t demod,
u32 ctrl, void *ctrl_data);
/*-------------------------------------------------------------------------
......
......@@ -41,7 +41,7 @@
#ifndef __DRXJ_MC_MAIN_H__
#define __DRXJ_MC_MAIN_H__
#define DRXJ_MC_MAIN ((u8 *) drxj_mc_main_g)
#define DRXJ_MC_MAIN ((u8 *)drxj_mc_main_g)
const u8 drxj_mc_main_g[] = {
0x48, 0x4c, 0x00, 0x06, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x00, 0x08,
......
......@@ -41,7 +41,7 @@
#ifndef __DRXJ_MC_VSB_H__
#define __DRXJ_MC_VSB_H__
#define DRXJ_MC_VSB ((u8 *) drxj_mc_vsb_g)
#define DRXJ_MC_VSB ((u8 *)drxj_mc_vsb_g)
const u8 drxj_mc_vsb_g[] = {
0x48, 0x4c, 0x00, 0x03, 0x00, 0x00, 0x2b, 0x62, 0x00, 0x00, 0x00, 0x08,
......
......@@ -42,7 +42,7 @@
#ifndef __DRXJ_MC_VSBQAM_H__
#define __DRXJ_MC_VSBQAM_H__
#define DRXJ_MC_VSBQAM ((u8 *) drxj_mc_vsbqam_g)
#define DRXJ_MC_VSBQAM ((u8 *)drxj_mc_vsbqam_g)
const u8 drxj_mc_vsbqam_g[] = {
0x48, 0x4c, 0x00, 0x04, 0x00, 0x00, 0x56, 0xa0, 0x00, 0x00, 0x00, 0x08,
......
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