Commit 8c79c49c authored by Janani Ravichandran's avatar Janani Ravichandran Committed by Greg Kroah-Hartman

staging: iio: Remove parantheses around right hand side of assignment

Remove parantheses on the right hand side of assignments as they are not
needed. Coccinelle patch used:
@@
expression a, b, c, d;
@@

(
  a = (c == d)
|
  a =
- (
  b
- )
)
Signed-off-by: default avatarJanani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fa882033
...@@ -214,8 +214,8 @@ static int __ad7280_read32(struct ad7280_state *st, unsigned *val) ...@@ -214,8 +214,8 @@ static int __ad7280_read32(struct ad7280_state *st, unsigned *val)
static int ad7280_write(struct ad7280_state *st, unsigned devaddr, static int ad7280_write(struct ad7280_state *st, unsigned devaddr,
unsigned addr, bool all, unsigned val) unsigned addr, bool all, unsigned val)
{ {
unsigned reg = (devaddr << 27 | addr << 21 | unsigned reg = devaddr << 27 | addr << 21 |
(val & 0xFF) << 13 | all << 12); (val & 0xFF) << 13 | all << 12;
reg |= ad7280_calc_crc8(st->crc_tab, reg >> 11) << 3 | 0x2; reg |= ad7280_calc_crc8(st->crc_tab, reg >> 11) << 3 | 0x2;
st->buf[0] = cpu_to_be32(reg); st->buf[0] = cpu_to_be32(reg);
......
...@@ -687,9 +687,9 @@ static int tsl2x7x_chip_on(struct iio_dev *indio_dev) ...@@ -687,9 +687,9 @@ static int tsl2x7x_chip_on(struct iio_dev *indio_dev)
/* Set the gain based on tsl2x7x_settings struct */ /* Set the gain based on tsl2x7x_settings struct */
chip->tsl2x7x_config[TSL2X7X_GAIN] = chip->tsl2x7x_config[TSL2X7X_GAIN] =
(chip->tsl2x7x_settings.als_gain | chip->tsl2x7x_settings.als_gain |
(TSL2X7X_mA100 | TSL2X7X_DIODE1) (TSL2X7X_mA100 | TSL2X7X_DIODE1)
| ((chip->tsl2x7x_settings.prox_gain) << 2)); | ((chip->tsl2x7x_settings.prox_gain) << 2);
/* set chip struct re scaling and saturation */ /* set chip struct re scaling and saturation */
chip->als_saturation = als_count * 922; /* 90% of full scale */ chip->als_saturation = als_count * 922; /* 90% of full scale */
...@@ -983,7 +983,7 @@ static ssize_t tsl2x7x_als_time_store(struct device *dev, ...@@ -983,7 +983,7 @@ static ssize_t tsl2x7x_als_time_store(struct device *dev,
result.fract /= 3; result.fract /= 3;
chip->tsl2x7x_settings.als_time = chip->tsl2x7x_settings.als_time =
(TSL2X7X_MAX_TIMER_CNT - (u8)result.fract); TSL2X7X_MAX_TIMER_CNT - (u8)result.fract;
dev_info(&chip->client->dev, "%s: als time = %d", dev_info(&chip->client->dev, "%s: als time = %d",
__func__, chip->tsl2x7x_settings.als_time); __func__, chip->tsl2x7x_settings.als_time);
......
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