Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1701818
| From | Bartosz Golaszewski <brgl@bgdev.pl> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 6/6] gpio: sodaville: use devres for irq generic chip |
| Date | 2017-08-02 10:00 +0200 |
| Message-ID | <u9WJs-70R-33@gated-at.bofh.it> (permalink) |
| References | <u9WJr-70R-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Use resource managed variants of irq_alloc_generic_chip() and
irq_setup_generic_chip().
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
---
drivers/gpio/gpio-sodaville.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/gpio/gpio-sodaville.c b/drivers/gpio/gpio-sodaville.c
index f60da83349ef..20a39f5ac361 100644
--- a/drivers/gpio/gpio-sodaville.c
+++ b/drivers/gpio/gpio-sodaville.c
@@ -155,8 +155,9 @@ static int sdv_register_irqsupport(struct sdv_gpio_chip_data *sd,
* we unmask & ACK the IRQ before the source of the interrupt is gone
* then the interrupt is active again.
*/
- sd->gc = irq_alloc_generic_chip("sdv-gpio", 1, sd->irq_base,
- sd->gpio_pub_base, handle_fasteoi_irq);
+ sd->gc = devm_irq_alloc_generic_chip(&pdev->dev, "sdv-gpio", 1,
+ sd->irq_base, sd->gpio_pub_base,
+ handle_fasteoi_irq);
if (!sd->gc)
return -ENOMEM;
@@ -170,9 +171,13 @@ static int sdv_register_irqsupport(struct sdv_gpio_chip_data *sd,
ct->chip.irq_eoi = irq_gc_eoi;
ct->chip.irq_set_type = sdv_gpio_pub_set_type;
- irq_setup_generic_chip(sd->gc, IRQ_MSK(SDV_NUM_PUB_GPIOS),
- IRQ_GC_INIT_MASK_CACHE, IRQ_NOREQUEST,
- IRQ_LEVEL | IRQ_NOPROBE);
+ ret = devm_irq_setup_generic_chip(&pdev->dev, sd->gc,
+ IRQ_MSK(SDV_NUM_PUB_GPIOS),
+ IRQ_GC_INIT_MASK_CACHE,
+ IRQ_NOREQUEST,
+ IRQ_LEVEL | IRQ_NOPROBE);
+ if (ret)
+ return ret;
sd->id = irq_domain_add_legacy(pdev->dev.of_node, SDV_NUM_PUB_GPIOS,
sd->irq_base, 0, &irq_domain_sdv_ops, sd);
--
2.13.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] gpio: use devres for irq generic chip Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-02 10:00 +0200
[PATCH 1/6] gpio: sta2x11: use devres for irq generic chip Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-02 10:00 +0200
Re: [PATCH 1/6] gpio: sta2x11: use devres for irq generic chip Linus Walleij <linus.walleij@linaro.org> - 2017-08-02 13:40 +0200
[PATCH 5/6] gpio: mxs: use devres for irq generic chip Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-02 10:00 +0200
[PATCH 4/6] gpio: mxc: use devres for irq generic chip Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-02 10:00 +0200
Re: [PATCH 4/6] gpio: mxc: use devres for irq generic chip Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-02 10:30 +0200
Re: [PATCH 4/6] gpio: mxc: use devres for irq generic chip Alexander Stein <alexander.stein@systec-electronic.com> - 2017-08-02 10:30 +0200
Re: [PATCH 4/6] gpio: mxc: use devres for irq generic chip Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-08-02 10:40 +0200
Re: [PATCH 4/6] gpio: mxc: use devres for irq generic chip Linus Walleij <linus.walleij@linaro.org> - 2017-08-02 13:50 +0200
Re: [PATCH 4/6] gpio: mxc: use devres for irq generic chip Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-02 14:00 +0200
[PATCH 3/6] gpio: pch: use devres for irq generic chip Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-02 10:00 +0200
Re: [PATCH 3/6] gpio: pch: use devres for irq generic chip Linus Walleij <linus.walleij@linaro.org> - 2017-08-02 13:40 +0200
[PATCH 6/6] gpio: sodaville: use devres for irq generic chip Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-02 10:00 +0200
[PATCH 2/6] gpio: ml-ioh: use devres for irq generic chip Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-02 10:00 +0200
Re: [PATCH 2/6] gpio: ml-ioh: use devres for irq generic chip Linus Walleij <linus.walleij@linaro.org> - 2017-08-02 13:40 +0200
csiph-web