diff options
author | Thierry Reding <treding@nvidia.com> | 2017-11-07 13:15:46 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-11-08 07:59:24 -0500 |
commit | da80ff81a8f54611b834d73149f8ac0d59151c87 (patch) | |
tree | 2c902035b3cf4945a17715440691fcaf6faacdb6 /drivers/gpio/gpiolib.c | |
parent | c44eafd79be666e7c81d22e215c945b27f2785f7 (diff) |
gpio: Move irqchip into struct gpio_irq_chip
In order to consolidate the multiple ways to associate an IRQ chip with
a GPIO chip, move more fields into the new struct gpio_irq_chip.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r-- | drivers/gpio/gpiolib.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 3827f0767101..d3d0b3134ba3 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c | |||
@@ -1646,7 +1646,7 @@ static int gpiochip_irq_map(struct irq_domain *d, unsigned int irq, | |||
1646 | * category than their parents, so it won't report false recursion. | 1646 | * category than their parents, so it won't report false recursion. |
1647 | */ | 1647 | */ |
1648 | irq_set_lockdep_class(irq, chip->lock_key); | 1648 | irq_set_lockdep_class(irq, chip->lock_key); |
1649 | irq_set_chip_and_handler(irq, chip->irqchip, chip->irq_handler); | 1649 | irq_set_chip_and_handler(irq, chip->irq.chip, chip->irq_handler); |
1650 | /* Chips that use nested thread handlers have them marked */ | 1650 | /* Chips that use nested thread handlers have them marked */ |
1651 | if (chip->irq_nested) | 1651 | if (chip->irq_nested) |
1652 | irq_set_nested_thread(irq, 1); | 1652 | irq_set_nested_thread(irq, 1); |
@@ -1739,10 +1739,10 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip) | |||
1739 | irq_domain_remove(gpiochip->irqdomain); | 1739 | irq_domain_remove(gpiochip->irqdomain); |
1740 | } | 1740 | } |
1741 | 1741 | ||
1742 | if (gpiochip->irqchip) { | 1742 | if (gpiochip->irq.chip) { |
1743 | gpiochip->irqchip->irq_request_resources = NULL; | 1743 | gpiochip->irq.chip->irq_request_resources = NULL; |
1744 | gpiochip->irqchip->irq_release_resources = NULL; | 1744 | gpiochip->irq.chip->irq_release_resources = NULL; |
1745 | gpiochip->irqchip = NULL; | 1745 | gpiochip->irq.chip = NULL; |
1746 | } | 1746 | } |
1747 | 1747 | ||
1748 | gpiochip_irqchip_free_valid_mask(gpiochip); | 1748 | gpiochip_irqchip_free_valid_mask(gpiochip); |
@@ -1817,7 +1817,7 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gpiochip, | |||
1817 | type = IRQ_TYPE_NONE; | 1817 | type = IRQ_TYPE_NONE; |
1818 | } | 1818 | } |
1819 | 1819 | ||
1820 | gpiochip->irqchip = irqchip; | 1820 | gpiochip->irq.chip = irqchip; |
1821 | gpiochip->irq_handler = handler; | 1821 | gpiochip->irq_handler = handler; |
1822 | gpiochip->irq_default_type = type; | 1822 | gpiochip->irq_default_type = type; |
1823 | gpiochip->to_irq = gpiochip_to_irq; | 1823 | gpiochip->to_irq = gpiochip_to_irq; |
@@ -1826,7 +1826,7 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gpiochip, | |||
1826 | gpiochip->ngpio, first_irq, | 1826 | gpiochip->ngpio, first_irq, |
1827 | &gpiochip_domain_ops, gpiochip); | 1827 | &gpiochip_domain_ops, gpiochip); |
1828 | if (!gpiochip->irqdomain) { | 1828 | if (!gpiochip->irqdomain) { |
1829 | gpiochip->irqchip = NULL; | 1829 | gpiochip->irq.chip = NULL; |
1830 | return -EINVAL; | 1830 | return -EINVAL; |
1831 | } | 1831 | } |
1832 | 1832 | ||