2014-12-17 15:59:17

by Ivan T. Ivanov

[permalink] [raw]
Subject: [PATCH] extcon: adc-jack: Release IIO channel on driver remove

Release IIO channel acquired during driver probe.

Signed-off-by: Ivan T. Ivanov <[email protected]>
---
drivers/extcon/extcon-adc-jack.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c
index d860229..ce8c6ff 100644
--- a/drivers/extcon/extcon-adc-jack.c
+++ b/drivers/extcon/extcon-adc-jack.c
@@ -173,6 +173,7 @@ static int adc_jack_remove(struct platform_device *pdev)

free_irq(data->irq, data);
cancel_work_sync(&data->handler.work);
+ iio_channel_release(data->chan);

return 0;
}
--
1.9.1


2014-12-18 00:30:09

by Chanwoo Choi

[permalink] [raw]
Subject: Re: [PATCH] extcon: adc-jack: Release IIO channel on driver remove

On 12/18/2014 12:59 AM, Ivan T. Ivanov wrote:
> Release IIO channel acquired during driver probe.
>
> Signed-off-by: Ivan T. Ivanov <[email protected]>
> ---
> drivers/extcon/extcon-adc-jack.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c
> index d860229..ce8c6ff 100644
> --- a/drivers/extcon/extcon-adc-jack.c
> +++ b/drivers/extcon/extcon-adc-jack.c
> @@ -173,6 +173,7 @@ static int adc_jack_remove(struct platform_device *pdev)
>
> free_irq(data->irq, data);
> cancel_work_sync(&data->handler.work);
> + iio_channel_release(data->chan);
>
> return 0;
> }
>

Applied it.

Thanks,
Chanwoo Choi