Commit e0326be0 authored by Paul Kocialkowski's avatar Paul Kocialkowski Committed by Jonathan Cameron

twl4030-madc: Request processed values in twl4030_get_madc_conversion

Not setting the raw parameter in the request causes it to be randomly
initialized to a value that might be different from zero or zero. This leads to
values that are randomly either raw or processed, making it very difficult to
make reliable use of the values.

Cc: Stable@vger.kernel.org
Signed-off-by: default avatarPaul Kocialkowski <contact@paulk.fr>
Acked-by: default avatarSebastian Reichel <sre@kernel.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent c404618c
......@@ -645,6 +645,7 @@ int twl4030_get_madc_conversion(int channel_no)
req.channels = (1 << channel_no);
req.method = TWL4030_MADC_SW2;
req.active = 0;
req.raw = 0;
req.func_cb = NULL;
ret = twl4030_madc_conversion(&req);
if (ret < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment