The branch main has been updated by jhb:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=01dcb4e6645f1a551e52763d58ba4375efbc5428

commit 01dcb4e6645f1a551e52763d58ba4375efbc5428
Author:     John Baldwin <[email protected]>
AuthorDate: 2025-12-09 20:03:03 +0000
Commit:     John Baldwin <[email protected]>
CommitDate: 2025-12-09 20:03:03 +0000

    gpio_alloc_intr_resource: Pass rid by value
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D53407
---
 sys/dev/gpio/gpioaei.c         | 2 +-
 sys/dev/gpio/gpiobus.c         | 4 ++--
 sys/dev/gpio/gpiobusvar.h      | 2 +-
 sys/dev/gpio/gpioc.c           | 2 +-
 sys/dev/gpio/gpiokeys.c        | 2 +-
 sys/dev/gpio/gpiopps.c         | 2 +-
 sys/dev/mmc/mmc_fdt_helpers.c  | 2 +-
 sys/dev/sdhci/sdhci_fdt_gpio.c | 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/sys/dev/gpio/gpioaei.c b/sys/dev/gpio/gpioaei.c
index 7b97277aaf61..9a769a793e5a 100644
--- a/sys/dev/gpio/gpioaei.c
+++ b/sys/dev/gpio/gpioaei.c
@@ -167,7 +167,7 @@ gpio_aei_enumerate(ACPI_RESOURCE * res, void * context)
 
                ctx->intr_rid = 0;
                ctx->intr_res = gpio_alloc_intr_resource(sc->dev,
-                   &ctx->intr_rid, RF_ACTIVE, ctx->gpio,
+                   ctx->intr_rid, RF_ACTIVE, ctx->gpio,
                    flags & GPIO_INTR_MASK);
                if (ctx->intr_res == NULL) {
                        device_printf(sc->dev,
diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c
index 848abe025f52..3563435965de 100644
--- a/sys/dev/gpio/gpiobus.c
+++ b/sys/dev/gpio/gpiobus.c
@@ -92,7 +92,7 @@ static int gpiobus_pin_toggle(device_t, device_t, uint32_t);
 #ifdef INTRNG
 
 struct resource *
-gpio_alloc_intr_resource(device_t consumer_dev, int *rid, u_int alloc_flags,
+gpio_alloc_intr_resource(device_t consumer_dev, int rid, u_int alloc_flags,
     gpio_pin_t pin, uint32_t intr_mode)
 {
        u_int irq;
@@ -116,7 +116,7 @@ gpio_alloc_intr_resource(device_t consumer_dev, int *rid, 
u_int alloc_flags,
 }
 #else
 struct resource *
-gpio_alloc_intr_resource(device_t consumer_dev, int *rid, u_int alloc_flags,
+gpio_alloc_intr_resource(device_t consumer_dev, int rid, u_int alloc_flags,
     gpio_pin_t pin, uint32_t intr_mode)
 {
 
diff --git a/sys/dev/gpio/gpiobusvar.h b/sys/dev/gpio/gpiobusvar.h
index 0528efe45525..22a10ad2abc2 100644
--- a/sys/dev/gpio/gpiobusvar.h
+++ b/sys/dev/gpio/gpiobusvar.h
@@ -166,7 +166,7 @@ int gpio_pin_getcaps(gpio_pin_t pin, uint32_t *caps);
 int gpio_pin_is_active(gpio_pin_t pin, bool *active);
 int gpio_pin_set_active(gpio_pin_t pin, bool active);
 int gpio_pin_setflags(gpio_pin_t pin, uint32_t flags);
-struct resource *gpio_alloc_intr_resource(device_t consumer_dev, int *rid,
+struct resource *gpio_alloc_intr_resource(device_t consumer_dev, int rid,
     u_int alloc_flags, gpio_pin_t pin, uint32_t intr_mode);
 
 int gpio_check_flags(uint32_t, uint32_t);
diff --git a/sys/dev/gpio/gpioc.c b/sys/dev/gpio/gpioc.c
index 517f7752daad..d26821395e55 100644
--- a/sys/dev/gpio/gpioc.c
+++ b/sys/dev/gpio/gpioc.c
@@ -208,7 +208,7 @@ gpioc_allocate_pin_intr(struct gpioc_softc *sc,
                goto error_exit;
 
        intr_conf->intr_res = gpio_alloc_intr_resource(sc->sc_dev,
-           &intr_conf->intr_rid, RF_ACTIVE, intr_conf->pin, flags);
+           intr_conf->intr_rid, RF_ACTIVE, intr_conf->pin, flags);
        if (intr_conf->intr_res == NULL) {
                err = ENXIO;
                goto error_pin;
diff --git a/sys/dev/gpio/gpiokeys.c b/sys/dev/gpio/gpiokeys.c
index a3180f046c58..deb5a0ab16a4 100644
--- a/sys/dev/gpio/gpiokeys.c
+++ b/sys/dev/gpio/gpiokeys.c
@@ -334,7 +334,7 @@ gpiokeys_attach_key(struct gpiokeys_softc *sc, phandle_t 
node,
                return;
        }
 
-       key->irq_res = gpio_alloc_intr_resource(sc->sc_dev, &key->irq_rid,
+       key->irq_res = gpio_alloc_intr_resource(sc->sc_dev, key->irq_rid,
            RF_ACTIVE, key->pin, GPIO_INTR_EDGE_BOTH);
        if (!key->irq_res) {
                device_printf(sc->sc_dev, "<%s> cannot allocate interrupt\n", 
key_name);
diff --git a/sys/dev/gpio/gpiopps.c b/sys/dev/gpio/gpiopps.c
index 82620a50a798..c2252e947dd0 100644
--- a/sys/dev/gpio/gpiopps.c
+++ b/sys/dev/gpio/gpiopps.c
@@ -218,7 +218,7 @@ gpiopps_fdt_attach(device_t dev)
         * Transform our 'gpios' property into an interrupt resource and set up
         * the interrupt.
         */
-       if ((sc->ires = gpio_alloc_intr_resource(dev, &sc->irid, RF_ACTIVE,
+       if ((sc->ires = gpio_alloc_intr_resource(dev, sc->irid, RF_ACTIVE,
            sc->gpin, edge)) == NULL) {
                device_printf(dev, "Cannot allocate an IRQ for the GPIO\n");
                gpiopps_detach(dev);
diff --git a/sys/dev/mmc/mmc_fdt_helpers.c b/sys/dev/mmc/mmc_fdt_helpers.c
index 980785464a00..086b91f20ef3 100644
--- a/sys/dev/mmc/mmc_fdt_helpers.c
+++ b/sys/dev/mmc/mmc_fdt_helpers.c
@@ -212,7 +212,7 @@ cd_setup(struct mmc_helper *helper, phandle_t node)
        /*
         * Create an interrupt resource from the pin and set up the interrupt.
         */
-       if ((helper->cd_ires = gpio_alloc_intr_resource(dev, &helper->cd_irid,
+       if ((helper->cd_ires = gpio_alloc_intr_resource(dev, helper->cd_irid,
            RF_ACTIVE, helper->cd_pin, GPIO_INTR_EDGE_BOTH)) == NULL) {
                if (bootverbose)
                        device_printf(dev, "Cannot allocate an IRQ for card "
diff --git a/sys/dev/sdhci/sdhci_fdt_gpio.c b/sys/dev/sdhci/sdhci_fdt_gpio.c
index e71c5e3eaf93..7e7e461e76b0 100644
--- a/sys/dev/sdhci/sdhci_fdt_gpio.c
+++ b/sys/dev/sdhci/sdhci_fdt_gpio.c
@@ -128,7 +128,7 @@ cd_setup(struct sdhci_fdt_gpio *gpio, phandle_t node)
        /*
         * Create an interrupt resource from the pin and set up the interrupt.
         */
-       if ((gpio->cd_ires = gpio_alloc_intr_resource(dev, &gpio->cd_irid,
+       if ((gpio->cd_ires = gpio_alloc_intr_resource(dev, gpio->cd_irid,
            RF_ACTIVE, gpio->cd_pin, GPIO_INTR_EDGE_BOTH)) == NULL) {
                if (bootverbose)
                        device_printf(dev, "Cannot allocate an IRQ for card "

Reply via email to