mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-07 03:18:31 +00:00
Staging: iio: tsl2x7x_core: Remove unrequired parentheses from DIV_ROUND_UP
Remove parentheses surrounding the first argument of the macro DIV_ROUND_UP as they are not required. Semantic patch used: @@ expression e1,e2; @@ DIV_ROUND_UP( - ( e1 - ) ,e2) Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3c6b71a503
commit
561e296734
1 changed files with 4 additions and 4 deletions
|
@ -418,9 +418,9 @@ static int tsl2x7x_get_lux(struct iio_dev *indio_dev)
|
||||||
if (p->ratio == 0) {
|
if (p->ratio == 0) {
|
||||||
lux = 0;
|
lux = 0;
|
||||||
} else {
|
} else {
|
||||||
ch0lux = DIV_ROUND_UP((ch0 * p->ch0),
|
ch0lux = DIV_ROUND_UP(ch0 * p->ch0,
|
||||||
tsl2X7X_als_gainadj[chip->tsl2x7x_settings.als_gain]);
|
tsl2X7X_als_gainadj[chip->tsl2x7x_settings.als_gain]);
|
||||||
ch1lux = DIV_ROUND_UP((ch1 * p->ch1),
|
ch1lux = DIV_ROUND_UP(ch1 * p->ch1,
|
||||||
tsl2X7X_als_gainadj[chip->tsl2x7x_settings.als_gain]);
|
tsl2X7X_als_gainadj[chip->tsl2x7x_settings.als_gain]);
|
||||||
lux = ch0lux - ch1lux;
|
lux = ch0lux - ch1lux;
|
||||||
}
|
}
|
||||||
|
@ -1057,7 +1057,7 @@ static ssize_t tsl2x7x_als_persistence_store(struct device *dev,
|
||||||
z = y * TSL2X7X_MIN_ITIME;
|
z = y * TSL2X7X_MIN_ITIME;
|
||||||
|
|
||||||
filter_delay =
|
filter_delay =
|
||||||
DIV_ROUND_UP(((result.integer * 1000) + result.fract), z);
|
DIV_ROUND_UP((result.integer * 1000) + result.fract, z);
|
||||||
|
|
||||||
chip->tsl2x7x_settings.persistence &= 0xF0;
|
chip->tsl2x7x_settings.persistence &= 0xF0;
|
||||||
chip->tsl2x7x_settings.persistence |= (filter_delay & 0x0F);
|
chip->tsl2x7x_settings.persistence |= (filter_delay & 0x0F);
|
||||||
|
@ -1103,7 +1103,7 @@ static ssize_t tsl2x7x_prox_persistence_store(struct device *dev,
|
||||||
z = y * TSL2X7X_MIN_ITIME;
|
z = y * TSL2X7X_MIN_ITIME;
|
||||||
|
|
||||||
filter_delay =
|
filter_delay =
|
||||||
DIV_ROUND_UP(((result.integer * 1000) + result.fract), z);
|
DIV_ROUND_UP((result.integer * 1000) + result.fract, z);
|
||||||
|
|
||||||
chip->tsl2x7x_settings.persistence &= 0x0F;
|
chip->tsl2x7x_settings.persistence &= 0x0F;
|
||||||
chip->tsl2x7x_settings.persistence |= ((filter_delay << 4) & 0xF0);
|
chip->tsl2x7x_settings.persistence |= ((filter_delay << 4) & 0xF0);
|
||||||
|
|
Loading…
Reference in a new issue