From: Ivan T. Ivanov <iivanov@mm-sol.com>
Date: Wed, 17 Dec 2014 15:59:27 +0000 (+0200)
Subject: extcon: adc-jack: Release IIO channel on driver remove
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5a696d9760fe99bd96dfc6ac336b7e2dc9b21c98;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

extcon: adc-jack: Release IIO channel on driver remove

Release IIO channel acquired during driver probe.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---

diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c
index 5d7ab577fba9..2bb82e55065a 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;
 }