diff options
author | Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com> | 2012-02-29 10:23:11 +0200 |
---|---|---|
committer | Ziyann <jaraidaniel@gmail.com> | 2014-10-01 13:00:32 +0200 |
commit | b03c139ab4cbff8bdafa52283a6b17628405e190 (patch) | |
tree | 76bfa0c1c362c42b1a7fe030c784908000e217f4 | |
parent | 8acd54bfa0be56cc616e4709ef9f50f7a0afa5a2 (diff) | |
download | kernel_samsung_tuna-b03c139ab4cbff8bdafa52283a6b17628405e190.zip kernel_samsung_tuna-b03c139ab4cbff8bdafa52283a6b17628405e190.tar.gz kernel_samsung_tuna-b03c139ab4cbff8bdafa52283a6b17628405e190.tar.bz2 |
MFD: TWL6030_GPADC: Fix gpadc ioctl return result
Function twl6030_gpadc_ioctl returns calibrated and corrected adc ch
values instead raw code values (command TWL6030_GPADC_IOCX_ADC_RAW_READ).
This patch fixes it.
Change-Id: I2709e378b764ee1f8c2786ed5fec5741d440c9e6
Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>
-rw-r--r-- | drivers/mfd/twl6030-gpadc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/twl6030-gpadc.c b/drivers/mfd/twl6030-gpadc.c index c776ac0..7a0c7e1 100644 --- a/drivers/mfd/twl6030-gpadc.c +++ b/drivers/mfd/twl6030-gpadc.c @@ -980,7 +980,7 @@ static long twl6030_gpadc_ioctl(struct file *filp, unsigned int cmd, val = twl6030_gpadc_conversion(&req); if (likely(val > 0)) { par.status = 0; - par.result = (u16)req.rbuf[par.channel]; + par.result = (u16)req.buf[par.channel].raw_code; } else if (val == 0) { par.status = -ENODATA; } else { |