Skip to content

Commit c07ce33

Browse files
arndbBartosz Golaszewski
authored andcommitted
gpio: synq: remove unused zynq_gpio_irq_reqres/zynq_gpio_irq_relres
The driver now uses the generic request/release callbacks, so the custom ones are no longer called. When building with -Woverride-init, gcc produces a warning about the duplicate entries: In file included from drivers/gpio/gpio-zynq.c:10: include/linux/gpio/driver.h:621:43: error: initialized field overwritten [-Werror=override-init] 621 | .irq_request_resources = gpiochip_irq_reqres, \ | ^~~~~~~~~~~~~~~~~~~ drivers/gpio/gpio-zynq.c:611:9: note: in expansion of macro 'GPIOCHIP_IRQ_RESOURCE_HELPERS' 611 | GPIOCHIP_IRQ_RESOURCE_HELPERS, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/gpio/driver.h:621:43: note: (near initialization for 'zynq_gpio_level_irqchip.irq_request_resources') 621 | .irq_request_resources = gpiochip_irq_reqres, \ | ^~~~~~~~~~~~~~~~~~~ drivers/gpio/gpio-zynq.c:625:9: note: in expansion of macro 'GPIOCHIP_IRQ_RESOURCE_HELPERS' 625 | GPIOCHIP_IRQ_RESOURCE_HELPERS, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/gpio/driver.h:622:43: error: initialized field overwritten [-Werror=override-init] 622 | .irq_release_resources = gpiochip_irq_relres | ^~~~~~~~~~~~~~~~~~~ Removing the old ones has no effect on the driver but avoids the warnings. Fixes: f569143 ("gpio: zynq: fix zynqmp_gpio not an immutable chip warning") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 0ea22c4 commit c07ce33

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

drivers/gpio/gpio-zynq.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -575,26 +575,6 @@ static int zynq_gpio_set_wake(struct irq_data *data, unsigned int on)
575575
return 0;
576576
}
577577

578-
static int zynq_gpio_irq_reqres(struct irq_data *d)
579-
{
580-
struct gpio_chip *chip = irq_data_get_irq_chip_data(d);
581-
int ret;
582-
583-
ret = pm_runtime_resume_and_get(chip->parent);
584-
if (ret < 0)
585-
return ret;
586-
587-
return gpiochip_reqres_irq(chip, d->hwirq);
588-
}
589-
590-
static void zynq_gpio_irq_relres(struct irq_data *d)
591-
{
592-
struct gpio_chip *chip = irq_data_get_irq_chip_data(d);
593-
594-
gpiochip_relres_irq(chip, d->hwirq);
595-
pm_runtime_put(chip->parent);
596-
}
597-
598578
/* irq chip descriptor */
599579
static const struct irq_chip zynq_gpio_level_irqchip = {
600580
.name = DRIVER_NAME,
@@ -604,8 +584,6 @@ static const struct irq_chip zynq_gpio_level_irqchip = {
604584
.irq_unmask = zynq_gpio_irq_unmask,
605585
.irq_set_type = zynq_gpio_set_irq_type,
606586
.irq_set_wake = zynq_gpio_set_wake,
607-
.irq_request_resources = zynq_gpio_irq_reqres,
608-
.irq_release_resources = zynq_gpio_irq_relres,
609587
.flags = IRQCHIP_EOI_THREADED | IRQCHIP_EOI_IF_HANDLED |
610588
IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_IMMUTABLE,
611589
GPIOCHIP_IRQ_RESOURCE_HELPERS,
@@ -619,8 +597,6 @@ static const struct irq_chip zynq_gpio_edge_irqchip = {
619597
.irq_unmask = zynq_gpio_irq_unmask,
620598
.irq_set_type = zynq_gpio_set_irq_type,
621599
.irq_set_wake = zynq_gpio_set_wake,
622-
.irq_request_resources = zynq_gpio_irq_reqres,
623-
.irq_release_resources = zynq_gpio_irq_relres,
624600
.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_IMMUTABLE,
625601
GPIOCHIP_IRQ_RESOURCE_HELPERS,
626602
};

0 commit comments

Comments
 (0)