diff options
author | Zubair Lutfullah <zubair.lutfullah@gmail.com> | 2013-09-22 09:20:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-09-22 19:02:48 +0100 |
commit | 074b6a8d9d73db27d48abe4200ce149bd4189b39 (patch) | |
tree | 0510cc83b943a87b157aebafdaba4afc36c19ce0 /drivers/iio/adc | |
parent | a77d0209120aef181b6da252df2b4c83383c5a50 (diff) | |
download | linux-074b6a8d9d73db27d48abe4200ce149bd4189b39.tar.bz2 |
iio: ti_am335x_adc: cleanup error case
Driver is functional without this error case. Cleaned up.
Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r-- | drivers/iio/adc/ti_am335x_adc.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index 4eb63eb42711..8fb5429e39ae 100644 --- a/drivers/iio/adc/ti_am335x_adc.c +++ b/drivers/iio/adc/ti_am335x_adc.c @@ -323,7 +323,6 @@ static int tiadc_read_raw(struct iio_dev *indio_dev, struct tiadc_device *adc_dev = iio_priv(indio_dev); int i, map_val; unsigned int fifo1count, read, stepid; - u32 step = UINT_MAX; bool found = false; u32 step_en; unsigned long timeout = jiffies + usecs_to_jiffies @@ -353,15 +352,6 @@ static int tiadc_read_raw(struct iio_dev *indio_dev, * Hence we need to flush out this data. */ - for (i = 0; i < ARRAY_SIZE(adc_dev->channel_step); i++) { - if (chan->channel == adc_dev->channel_line[i]) { - step = adc_dev->channel_step[i]; - break; - } - } - if (WARN_ON_ONCE(step == UINT_MAX)) - return -EINVAL; - fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT); for (i = 0; i < fifo1count; i++) { read = tiadc_readl(adc_dev, REG_FIFO1); |