Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1611574
| From | Arushi Singhal <arushisinghal19971997@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] staging: iio: Use devm functions |
| Date | 2017-03-29 07:10 +0200 |
| Message-ID | <tqe1Q-29U-19@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Use managed resource functions devm_request_irq instead of request_irq.
Remove corresponding calls to free_irq in the probe.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
drivers/staging/iio/trigger/iio-trig-bfin-timer.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
index 4e0b4eedb53d..42473d095911 100644
--- a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
+++ b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
@@ -211,8 +211,9 @@ static int iio_bfin_tmr_trigger_probe(struct platform_device *pdev)
if (ret)
goto out;
- ret = request_irq(st->irq, iio_bfin_tmr_trigger_isr,
- 0, st->trig->name, st);
+ ret = devm_request_irq(&pdev->dev,
+ st->irq, iio_bfin_tmr_trigger_isr,
+ 0, st->trig->name, st);
if (ret) {
dev_err(&pdev->dev,
"request IRQ-%d failed", st->irq);
@@ -256,7 +257,6 @@ static int iio_bfin_tmr_trigger_probe(struct platform_device *pdev)
return 0;
out_free_irq:
- free_irq(st->irq, st);
out1:
iio_trigger_unregister(st->trig);
out:
@@ -271,7 +271,6 @@ static int iio_bfin_tmr_trigger_remove(struct platform_device *pdev)
disable_gptimers(st->t->bit);
if (st->output_enable)
peripheral_free(st->t->pin);
- free_irq(st->irq, st);
iio_trigger_unregister(st->trig);
iio_trigger_free(st->trig);
--
2.11.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] staging: iio: Use devm functions Arushi Singhal <arushisinghal19971997@gmail.com> - 2017-03-29 07:10 +0200 Re: [Outreachy kernel] [PATCH] staging: iio: Use devm functions Julia Lawall <julia.lawall@lip6.fr> - 2017-03-29 08:10 +0200
csiph-web