diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2015-09-25 09:40:51 -0400 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2015-09-30 06:22:49 -0400 |
commit | ae59f3a21fbe4b9ef3a9a09deabd2b0afb80942d (patch) | |
tree | e8edd93e82f27940fdcb08dd809d48d502285757 /drivers/extcon/extcon-gpio.c | |
parent | e9844b2cafd7b78486400f9b6cf3188e9a527312 (diff) |
extcon: gpio: Use resource managed function for request_irq
This patch uses the resource managed function for registering
interrupt.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon-gpio.c')
-rw-r--r-- | drivers/extcon/extcon-gpio.c | 7 |
1 files 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) | |||
118 | if (extcon_data->irq < 0) | 118 | if (extcon_data->irq < 0) |
119 | return extcon_data->irq; | 119 | return extcon_data->irq; |
120 | 120 | ||
121 | ret = request_any_context_irq(extcon_data->irq, gpio_irq_handler, | 121 | ret = devm_request_any_context_irq(&pdev->dev, extcon_data->irq, |
122 | pdata->irq_flags, pdev->name, | 122 | gpio_irq_handler, pdata->irq_flags, |
123 | extcon_data); | 123 | pdev->name, extcon_data); |
124 | if (ret < 0) | 124 | if (ret < 0) |
125 | return ret; | 125 | return ret; |
126 | 126 | ||
@@ -136,7 +136,6 @@ static int gpio_extcon_remove(struct platform_device *pdev) | |||
136 | struct gpio_extcon_data *extcon_data = platform_get_drvdata(pdev); | 136 | struct gpio_extcon_data *extcon_data = platform_get_drvdata(pdev); |
137 | 137 | ||
138 | cancel_delayed_work_sync(&extcon_data->work); | 138 | cancel_delayed_work_sync(&extcon_data->work); |
139 | free_irq(extcon_data->irq, extcon_data); | ||
140 | 139 | ||
141 | return 0; | 140 | return 0; |
142 | } | 141 | } |