lkml.org 
[lkml]   [2014]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.14 167/238] hwmon: (ds1621) Update zbits after conversion rate change
    Date
    3.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Robert Coulson <rob.coulson@gmail.com>

    commit 39c627a084475e8a690a4a9e7601410ca173ddd2 upstream.

    After the conversion rate is changed, the zbits are not updated,
    but should be, since they are used later in the set_temp function.

    Fixes: a50d9a4d9ad3 ("hwmon: (ds1621) Fix temperature rounding operations")
    Reported-by: Murat Ilsever <murat.ilsever@gmail.com>
    Signed-off-by: Robert Coulson <rob.coulson@gmail.com>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/hwmon/ds1621.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/hwmon/ds1621.c
    +++ b/drivers/hwmon/ds1621.c
    @@ -309,6 +309,7 @@ static ssize_t set_convrate(struct devic
    data->conf |= (resol << DS1621_REG_CONFIG_RESOL_SHIFT);
    i2c_smbus_write_byte_data(client, DS1621_REG_CONF, data->conf);
    data->update_interval = ds1721_convrates[resol];
    + data->zbits = 7 - resol;
    mutex_unlock(&data->update_lock);

    return count;



    \
     
     \ /
      Last update: 2014-10-04 02:01    [W:4.065 / U:0.248 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site