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

[media] drx-j: CodingStyle fixups on drxj.c

Fix almost all checkpatch.pl warnings/errors on drxj.c, except for:
- 80 cols whitespacing;
- too many leading tabs;
- a false positive at DRXJ_16TO8() macro.
- static char array declaration should probably be static const char
  as adding "const" would cause warnings.
Acked-by: default avatarDevin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 60d3603b
...@@ -284,9 +284,8 @@ static int drxdap_fasi_read_block(struct i2c_device_addr *dev_addr, ...@@ -284,9 +284,8 @@ static int drxdap_fasi_read_block(struct i2c_device_addr *dev_addr,
* No special action is needed for write chunks here. * No special action is needed for write chunks here.
*/ */
rc = drxbsp_i2c_write_read(dev_addr, bufx, buf, 0, 0, 0); rc = drxbsp_i2c_write_read(dev_addr, bufx, buf, 0, 0, 0);
if (rc == DRX_STS_OK) { if (rc == DRX_STS_OK)
rc = drxbsp_i2c_write_read(0, 0, 0, dev_addr, todo, data); rc = drxbsp_i2c_write_read(0, 0, 0, dev_addr, todo, data);
}
#else #else
/* In multi master mode, do everything in one RW action */ /* In multi master mode, do everything in one RW action */
rc = drxbsp_i2c_write_read(dev_addr, bufx, buf, dev_addr, todo, rc = drxbsp_i2c_write_read(dev_addr, bufx, buf, dev_addr, todo,
...@@ -338,9 +337,8 @@ static int drxdap_fasi_read_modify_write_reg16(struct i2c_device_addr *dev_addr, ...@@ -338,9 +337,8 @@ static int drxdap_fasi_read_modify_write_reg16(struct i2c_device_addr *dev_addr,
} }
rc = drxdap_fasi_write_reg16(dev_addr, waddr, wdata, DRXDAP_FASI_RMW); rc = drxdap_fasi_write_reg16(dev_addr, waddr, wdata, DRXDAP_FASI_RMW);
if (rc == DRX_STS_OK) { if (rc == DRX_STS_OK)
rc = drxdap_fasi_read_reg16(dev_addr, raddr, rdata, 0); rc = drxdap_fasi_read_reg16(dev_addr, raddr, rdata, 0);
}
#endif #endif
return rc; return rc;
......
...@@ -186,9 +186,8 @@ static void *get_scan_context(struct drx_demod_instance *demod, void *scan_conte ...@@ -186,9 +186,8 @@ static void *get_scan_context(struct drx_demod_instance *demod, void *scan_conte
common_attr = (struct drx_common_attr *) demod->my_common_attr; common_attr = (struct drx_common_attr *) demod->my_common_attr;
scan_context = common_attr->scan_context; scan_context = common_attr->scan_context;
if (scan_context == NULL) { if (scan_context == NULL)
scan_context = (void *)demod; scan_context = (void *)demod;
}
return scan_context; return scan_context;
} }
...@@ -482,10 +481,8 @@ ctrl_scan_init(struct drx_demod_instance *demod, struct drx_scan_param *scan_par ...@@ -482,10 +481,8 @@ ctrl_scan_init(struct drx_demod_instance *demod, struct drx_scan_param *scan_par
s32 n = 0; s32 n = 0;
n = (min_tuner_freq - first_freq) / step; n = (min_tuner_freq - first_freq) / step;
if (((min_tuner_freq - if (((min_tuner_freq - first_freq) % step) != 0)
first_freq) % step) != 0) {
n++; n++;
}
min_freq = first_freq + n * step; min_freq = first_freq + n * step;
} }
...@@ -495,10 +492,8 @@ ctrl_scan_init(struct drx_demod_instance *demod, struct drx_scan_param *scan_par ...@@ -495,10 +492,8 @@ ctrl_scan_init(struct drx_demod_instance *demod, struct drx_scan_param *scan_par
s32 n = 0; s32 n = 0;
n = (last_freq - max_tuner_freq) / step; n = (last_freq - max_tuner_freq) / step;
if (((last_freq - if (((last_freq - max_tuner_freq) % step) != 0)
max_tuner_freq) % step) != 0) {
n++; n++;
}
max_freq = last_freq - n * step; max_freq = last_freq - n * step;
} }
} }
...@@ -950,9 +945,8 @@ static u16 u_code_compute_crc(u8 *block_data, u16 nr_words) ...@@ -950,9 +945,8 @@ static u16 u_code_compute_crc(u8 *block_data, u16 nr_words)
crc_word |= (u32) u_code_read16(block_data); crc_word |= (u32) u_code_read16(block_data);
for (j = 0; j < 16; j++) { for (j = 0; j < 16; j++) {
crc_word <<= 1; crc_word <<= 1;
if (carry != 0) { if (carry != 0)
crc_word ^= 0x80050000UL; crc_word ^= 0x80050000UL;
}
carry = crc_word & 0x80000000UL; carry = crc_word & 0x80000000UL;
} }
i++; i++;
...@@ -1320,9 +1314,8 @@ int drx_open(struct drx_demod_instance *demod) ...@@ -1320,9 +1314,8 @@ int drx_open(struct drx_demod_instance *demod)
status = (*(demod->my_demod_funct->open_func)) (demod); status = (*(demod->my_demod_funct->open_func)) (demod);
if (status == DRX_STS_OK) { if (status == DRX_STS_OK)
demod->my_common_attr->is_opened = true; demod->my_common_attr->is_opened = true;
}
return status; return status;
} }
......
This diff is collapsed.
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