Patch "hwmon: (ads1015) Handle negative conversion values correctly" has been added to the 3.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
hwmon: (ads1015) Handle negative conversion values correctly
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
hwmon-ads1015-handle-negative-conversion-values-correctly.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
acc146943957d7418a6846f06e029b2c5e87e0d5Mon Sep 17 00:00:00 2001
From: Peter Rosin <[email protected]>
Date: Thu, 18 Feb 2016 14:07:52 +0100
Subject: hwmon: (ads1015) Handle negative conversion values correctly
From: Peter Rosin <[email protected]>
commit acc146943957d7418a6846f06e029b2c5e87e0d5 upstream.
Make the divisor signed as DIV_ROUND_CLOSEST is undefined for negative dividends when the divisor is unsigned.
--- drivers/hwmon/ads1015.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/ads1015.c +1 -1
@@ -126,7 +126,7 @@ static int ads1015_reg_to_mv(struct i2c_struct ads1015_data *data =i2c_get_clientdata (client);unsigned int pga = data->channel_data[channel].pga;int fullscale = fullscale_table[pga]; -const unsigned mask = data->id == ads1115 ?0x7fff :0x7ff0 ; +const int mask = data->id == ads1115 ?0x7fff :0x7ff0 ;return DIV_ROUND_CLOSEST (reg * fullscale, mask); }
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/hwmon-ads1015-handle-negative-conversion-values-correctly.patch