mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
gpio: ml-ioh: use devres for irq generic chip
Use resource managed variants of irq_alloc_generic_chip() and irq_setup_generic_chip(). Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
624b5a9c0b
commit
469d59430f
1 changed files with 7 additions and 5 deletions
|
|
@ -391,9 +391,10 @@ static int ioh_gpio_alloc_generic_chip(struct ioh_gpio *chip,
|
|||
{
|
||||
struct irq_chip_generic *gc;
|
||||
struct irq_chip_type *ct;
|
||||
int rv;
|
||||
|
||||
gc = irq_alloc_generic_chip("ioh_gpio", 1, irq_start, chip->base,
|
||||
handle_simple_irq);
|
||||
gc = devm_irq_alloc_generic_chip(chip->dev, "ioh_gpio", 1, irq_start,
|
||||
chip->base, handle_simple_irq);
|
||||
if (!gc)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
@ -406,10 +407,11 @@ static int ioh_gpio_alloc_generic_chip(struct ioh_gpio *chip,
|
|||
ct->chip.irq_disable = ioh_irq_disable;
|
||||
ct->chip.irq_enable = ioh_irq_enable;
|
||||
|
||||
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 ioh_gpio_probe(struct pci_dev *pdev,
|
||||
|
|
|
|||
Loading…
Reference in a new issue