Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67663424 authored by Brian Masney's avatar Brian Masney Committed by Jonathan Cameron
Browse files

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: default avatarBrian Masney <masneyb@onstation.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 71a0a643
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -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;