Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1701816
| From | Bartosz Golaszewski <brgl@bgdev.pl> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/6] gpio: pch: use devres for irq generic chip |
| Date | 2017-08-02 10:00 +0200 |
| Message-ID | <u9WJs-70R-31@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-pch.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c
index f6600f8ada52..68c6d0c5a6d1 100644
--- a/drivers/gpio/gpio-pch.c
+++ b/drivers/gpio/gpio-pch.c
@@ -337,9 +337,10 @@ static int pch_gpio_alloc_generic_chip(struct pch_gpio *chip,
{
struct irq_chip_generic *gc;
struct irq_chip_type *ct;
+ int rv;
- gc = irq_alloc_generic_chip("pch_gpio", 1, irq_start, chip->base,
- handle_simple_irq);
+ gc = devm_irq_alloc_generic_chip(chip->dev, "pch_gpio", 1, irq_start,
+ chip->base, handle_simple_irq);
if (!gc)
return -ENOMEM;
@@ -351,10 +352,11 @@ static int pch_gpio_alloc_generic_chip(struct pch_gpio *chip,
ct->chip.irq_unmask = pch_irq_unmask;
ct->chip.irq_set_type = pch_irq_type;
- irq_setup_generic_chip(gc, IRQ_MSK(num), IRQ_GC_INIT_MASK_CACHE,
- IRQ_NOREQUEST | IRQ_NOPROBE, 0);
+ rv = devm_irq_setup_generic_chip(chip->dev, gc, IRQ_MSK(num),
+ IRQ_GC_INIT_MASK_CACHE,
+ IRQ_NOREQUEST | IRQ_NOPROBE, 0);
- return 0;
+ return rv;
}
static int pch_gpio_probe(struct pci_dev *pdev,
--
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