Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1236906

[PATCH 1/5] extcon: gpio: Use resource managed function for request_irq

From Chanwoo Choi <cw00.choi@samsung.com>
Newsgroups linux.kernel
Subject [PATCH 1/5] extcon: gpio: Use resource managed function for request_irq
Date 2015-10-01 04:30 +0200
Message-ID <qeBN8-6ZF-9@gated-at.bofh.it> (permalink)
References <qeBN8-6ZF-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch uses the resource managed function for registering
interrupt.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/extcon/extcon-gpio.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c
index 57c24fa52edb..7e7fd8f5d838 100644
--- a/drivers/extcon/extcon-gpio.c
+++ b/drivers/extcon/extcon-gpio.c
@@ -118,9 +118,9 @@ static int gpio_extcon_probe(struct platform_device *pdev)
 	if (extcon_data->irq < 0)
 		return extcon_data->irq;
 
-	ret = request_any_context_irq(extcon_data->irq, gpio_irq_handler,
-				      pdata->irq_flags, pdev->name,
-				      extcon_data);
+	ret = devm_request_any_context_irq(&pdev->dev, extcon_data->irq,
+					gpio_irq_handler, pdata->irq_flags,
+					pdev->name, extcon_data);
 	if (ret < 0)
 		return ret;
 
@@ -136,7 +136,6 @@ static int gpio_extcon_remove(struct platform_device *pdev)
 	struct gpio_extcon_data *extcon_data = platform_get_drvdata(pdev);
 
 	cancel_delayed_work_sync(&extcon_data->work);
-	free_irq(extcon_data->irq, extcon_data);
 
 	return 0;
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 1/5] extcon: gpio: Use resource managed function for request_irq Chanwoo Choi <cw00.choi@samsung.com> - 2015-10-01 04:30 +0200

csiph-web