* [PATCH 1/1] iio: amplifiers: ad8366: Remove regulator_put
@ 2013-09-24 11:49 Sachin Kamat
2013-09-28 10:50 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Sachin Kamat @ 2013-09-24 11:49 UTC (permalink / raw)
To: linux-iio; +Cc: jic23, sachin.kamat
Since devm_regulator_get is used, regulator_put should not be
used. Remove it.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/iio/amplifiers/ad8366.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/iio/amplifiers/ad8366.c b/drivers/iio/amplifiers/ad8366.c
index d0a79a4..ba6f6a9 100644
--- a/drivers/iio/amplifiers/ad8366.c
+++ b/drivers/iio/amplifiers/ad8366.c
@@ -185,10 +185,8 @@ static int ad8366_remove(struct spi_device *spi)
iio_device_unregister(indio_dev);
- if (!IS_ERR(reg)) {
+ if (!IS_ERR(reg))
regulator_disable(reg);
- regulator_put(reg);
- }
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] iio: amplifiers: ad8366: Remove regulator_put
2013-09-24 11:49 [PATCH 1/1] iio: amplifiers: ad8366: Remove regulator_put Sachin Kamat
@ 2013-09-28 10:50 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2013-09-28 10:50 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-iio
On 09/24/13 12:49, Sachin Kamat wrote:
> Since devm_regulator_get is used, regulator_put should not be
> used. Remove it.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Applied to the fixes-togreg branch of iio.git
Thanks
> ---
> drivers/iio/amplifiers/ad8366.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/iio/amplifiers/ad8366.c b/drivers/iio/amplifiers/ad8366.c
> index d0a79a4..ba6f6a9 100644
> --- a/drivers/iio/amplifiers/ad8366.c
> +++ b/drivers/iio/amplifiers/ad8366.c
> @@ -185,10 +185,8 @@ static int ad8366_remove(struct spi_device *spi)
>
> iio_device_unregister(indio_dev);
>
> - if (!IS_ERR(reg)) {
> + if (!IS_ERR(reg))
> regulator_disable(reg);
> - regulator_put(reg);
> - }
>
> return 0;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-28 9:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-24 11:49 [PATCH 1/1] iio: amplifiers: ad8366: Remove regulator_put Sachin Kamat
2013-09-28 10:50 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).