From: Jonathan Cameron <jic23@kernel.org>
To: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Cc: jic23@cam.ac.uk, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org
Subject: Re: [PATCH 3/3] iio: ti_am335x_adc: cleanup error case
Date: Sun, 22 Sep 2013 20:21:13 +0100 [thread overview]
Message-ID: <523F4329.6020901@kernel.org> (raw)
In-Reply-To: <1379838005-15158-4-git-send-email-zubair.lutfullah@gmail.com>
On 09/22/13 09:20, Zubair Lutfullah wrote:
> Driver is functional without this error case. Cleaned up.
>
> Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Applied and pull request just sent to Greg.
> ---
> drivers/iio/adc/ti_am335x_adc.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
> index 4eb63eb..8fb5429 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);
>
prev parent reply other threads:[~2013-09-22 19:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-22 8:20 [PATCH 0/3] iio: ti_am335x_adc: small fix and cleanup Zubair Lutfullah
2013-09-22 8:20 ` [PATCH 1/3] iio: ti_am335x_adc: fix static in function header Zubair Lutfullah
2013-09-22 18:03 ` Jonathan Cameron
2013-09-26 8:09 ` Zubair Lutfullah :
2013-09-22 8:20 ` [PATCH 2/3] iio: ti_am335x_adc: cleanup trigger related code Zubair Lutfullah
2013-09-22 19:20 ` Jonathan Cameron
2013-09-22 8:20 ` [PATCH 3/3] iio: ti_am335x_adc: cleanup error case Zubair Lutfullah
2013-09-22 19:21 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=523F4329.6020901@kernel.org \
--to=jic23@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@cam.ac.uk \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zubair.lutfullah@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.