Remove irq_base from struct gpio_chip, as it is seems to
be unused.
Aslo, using this field by drivers is unsafe because it's
uncompatible with Sparse IRQ feature.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
Hi Linus,
I've not found users of this field in drivers/gpio/ folder,
so I've decided to created this patch to get more comments.
drivers/gpio/gpiolib.c | 9 +--------
include/linux/gpio/driver.h | 1 -
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index f6bf368..8aa84d5 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -605,15 +605,8 @@ int gpiochip_irqchip_add(struct gpio_chip *gpiochip,
* any gpiochip calls. If the first_irq was zero, this is
* necessary to allocate descriptors for all IRQs.
*/
- for (offset = 0; offset < gpiochip->ngpio; offset++) {
+ for (offset = 0; offset < gpiochip->ngpio; offset++)
irq_base = irq_create_mapping(gpiochip->irqdomain, offset);
- if (offset == 0)
- /*
- * Store the base into the gpiochip to be used when
- * unmapping the irqs.
- */
- gpiochip->irq_base = irq_base;
- }
acpi_gpiochip_request_interrupts(gpiochip);
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index e78a237..976276a 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -110,7 +110,6 @@ struct gpio_chip {
*/
struct irq_chip *irqchip;
struct irq_domain *irqdomain;
- unsigned int irq_base;
irq_flow_handler_t irq_handler;
unsigned int irq_default_type;
#endif--
1.9.1