lkml.org 
[lkml]   [2016]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 16/28] staging: iio: tsl2583: updated code comment to match what the code does
    Date
    If channel 0 does not have any data, then the code sets the lux to zero.
    The corresponding comment says that the last value is returned. This
    updates the comment to correctly reflect what the code does.

    Signed-off-by: Brian Masney <masneyb@onstation.org>
    ---
    drivers/staging/iio/light/tsl2583.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
    index 52a39a6..390ff8b 100644
    --- a/drivers/staging/iio/light/tsl2583.c
    +++ b/drivers/staging/iio/light/tsl2583.c
    @@ -221,7 +221,7 @@ static int tsl2583_get_lux(struct iio_dev *indio_dev)
    goto return_max;

    if (!ch0) {
    - /* have no data, so return LAST VALUE */
    + /* have no data, so return 0 */
    ret = 0;
    chip->als_cur_info.lux = 0;
    goto done;
    --
    2.7.4
    \
     
     \ /
      Last update: 2016-11-10 10:33    [W:4.184 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site