[PATCH 5/5 v3] iio: exynos_adc: do a reinit_completion before the conversion

2014-04-30 Thread Naveen Krishna Chatradhi
Add reinit_completion() before the wait_for_completion_timeout in
raw_read() call.

Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com
Reviewed-by: Doug Anderson diand...@chromium.org
---
Changes since v2:
None
Changes since v1:
None
v0:
This change is a part of the patch reviewed at 
https://lkml.org/lkml/2013/11/5/92

 drivers/iio/adc/exynos_adc.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index eddc58e..010578f 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -151,6 +151,7 @@ static int exynos_read_raw(struct iio_dev *indio_dev,
return -EINVAL;
 
mutex_lock(indio_dev-mlock);
+   reinit_completion(info-completion);
 
/* Select the channel to be used and Trigger conversion */
if (info-version == ADC_V2) {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/5 v3] iio: exynos_adc: do a reinit_completion before the conversion

2014-04-30 Thread Jonathan Cameron

On 30/04/14 10:26, Naveen Krishna Chatradhi wrote:

Add reinit_completion() before the wait_for_completion_timeout in
raw_read() call.

Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com
Reviewed-by: Doug Anderson diand...@chromium.org

Applied to the togreg branch of iio.git
I wasn't sure if this one was technically a fix, but as it isn't
marked clearly as such it can go in during the next merge window.
I won't have pushed this out to a non rebasing branch until tomorrow
so if this fixes an observed issue then let me know and it might move
to the fixes-togreg branch.

Thanks,

Jonathan

---
Changes since v2:
None
Changes since v1:
None
v0:
This change is a part of the patch reviewed at 
https://lkml.org/lkml/2013/11/5/92

  drivers/iio/adc/exynos_adc.c |1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index eddc58e..010578f 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -151,6 +151,7 @@ static int exynos_read_raw(struct iio_dev *indio_dev,
return -EINVAL;

mutex_lock(indio_dev-mlock);
+   reinit_completion(info-completion);

/* Select the channel to be used and Trigger conversion */
if (info-version == ADC_V2) {



--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/5 v3] iio: exynos_adc: do a reinit_completion before the conversion

2014-04-30 Thread Doug Anderson
Jonathan,

On Wed, Apr 30, 2014 at 1:49 PM, Jonathan Cameron ji...@kernel.org wrote:
 On 30/04/14 10:26, Naveen Krishna Chatradhi wrote:

 Add reinit_completion() before the wait_for_completion_timeout in
 raw_read() call.

 Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com
 Reviewed-by: Doug Anderson diand...@chromium.org

 Applied to the togreg branch of iio.git
 I wasn't sure if this one was technically a fix, but as it isn't
 marked clearly as such it can go in during the next merge window.
 I won't have pushed this out to a non rebasing branch until tomorrow
 so if this fixes an observed issue then let me know and it might move
 to the fixes-togreg branch.

As far as I know this doesn't fix an observed issue.  I believe it was
requested as part of a previous review and is finally reposted.  I
believe it's just extra precautions to make sure that some old IRQ
didn't accidentally complete us between the last transaction and this
one.

Old discussion is somewhere around here
https://patchwork.kernel.org/patch/2279591/

Thanks!

-Doug
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/5 v3] iio: exynos_adc: do a reinit_completion before the conversion

2014-04-30 Thread Jonathan Cameron


On May 1, 2014 12:23:27 AM GMT+01:00, Doug Anderson diand...@chromium.org 
wrote:
Jonathan,

On Wed, Apr 30, 2014 at 1:49 PM, Jonathan Cameron ji...@kernel.org
wrote:
 On 30/04/14 10:26, Naveen Krishna Chatradhi wrote:

 Add reinit_completion() before the wait_for_completion_timeout in
 raw_read() call.

 Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com
 Reviewed-by: Doug Anderson diand...@chromium.org

 Applied to the togreg branch of iio.git
 I wasn't sure if this one was technically a fix, but as it isn't
 marked clearly as such it can go in during the next merge window.
 I won't have pushed this out to a non rebasing branch until tomorrow
 so if this fixes an observed issue then let me know and it might move
 to the fixes-togreg branch.

As far as I know this doesn't fix an observed issue.  I believe it was
requested as part of a previous review and is finally reposted.  I
believe it's just extra precautions to make sure that some old IRQ
didn't accidentally complete us between the last transaction and this
one.

Old discussion is somewhere around here
https://patchwork.kernel.org/patch/2279591/
Thanks for clarifying this.

J

Thanks!

-Doug

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html