[PATCH 11/19] bh1770glc: removed lux_read_raw_result() function

From: Andi Shyti
Date: Thu Jun 13 2013 - 14:32:21 EST


lux_raw_result_show() will run directly the lux_get_result()
instead of using another support function

Signed-off-by: Andi Shyti <andi@xxxxxxxxxxx>
---
drivers/misc/bh1770glc.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/misc/bh1770glc.c b/drivers/misc/bh1770glc.c
index b5fc2b9..eec799e 100644
--- a/drivers/misc/bh1770glc.c
+++ b/drivers/misc/bh1770glc.c
@@ -385,12 +385,6 @@ static int bh1770_lux_read_result(struct bh1770_chip *chip)
return bh1770_lux_raw_to_adjusted(chip, chip->lux_data_raw);
}

-static int bh1770_lux_read_raw_result(struct bh1770_chip *chip)
-{
- bh1770_lux_get_result(chip);
- return chip->lux_data_raw;
-}
-
/*
* Chip on / off functions are called while keeping mutex except probe
* or remove phase
@@ -725,7 +719,8 @@ static ssize_t bh1770_lux_raw_result_show(struct device *dev,
return -EIO;

mutex_lock(&chip->mutex);
- ret = sprintf(buf, "%d\n", bh1770_lux_read_raw_result(chip));
+ bh1770_lux_get_result(chip);
+ ret = sprintf(buf, "%d\n", chip->lux_data_raw);
mutex_unlock(&chip->mutex);

return ret;
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/