diff options
author | Brian Masney <masneyb@onstation.org> | 2017-01-17 04:24:59 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-01-22 13:21:38 +0000 |
commit | 6766342441cbf286940f2c44b5cc869fa5a57046 (patch) | |
tree | 28f6d472f2e755f9b01b3edd77e18dee92558824 /drivers/staging/iio | |
parent | 71a0a643468e96caad4f0aa48d1041f319f3ba83 (diff) |
staging: iio: isl29028: remove enable flag from isl29028_enable_proximity()
isl29028_enable_proximity() has a boolean argument named enable. This
function is only called once and the enable flag is set to true in that
call. This patch removes the enable parameter from that function.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/light/isl29028.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/iio/light/isl29028.c b/drivers/staging/iio/light/isl29028.c index bc9c01d05424..f1b3651c779b 100644 --- a/drivers/staging/iio/light/isl29028.c +++ b/drivers/staging/iio/light/isl29028.c @@ -103,15 +103,13 @@ static int isl29028_set_proxim_sampling(struct isl29028_chip *chip, return ret; } -static int isl29028_enable_proximity(struct isl29028_chip *chip, bool enable) +static int isl29028_enable_proximity(struct isl29028_chip *chip) { int ret; - int val = 0; - if (enable) - val = ISL29028_CONF_PROX_EN; ret = regmap_update_bits(chip->regmap, ISL29028_REG_CONFIGURE, - ISL29028_CONF_PROX_EN_MASK, val); + ISL29028_CONF_PROX_EN_MASK, + ISL29028_CONF_PROX_EN); if (ret < 0) return ret; @@ -225,7 +223,7 @@ static int isl29028_read_proxim(struct isl29028_chip *chip, int *prox) int ret; if (!chip->enable_prox) { - ret = isl29028_enable_proximity(chip, true); + ret = isl29028_enable_proximity(chip); if (ret < 0) return ret; |