lux_raw_result_show() will run directly the lux_get_result() instead of using another support function
Signed-off-by: Andi Shyti <a...@etezian.org> --- 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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/