git: fffdfe2f6770 - stable/14 - gpiobus: Make gpiobus_read_ivar extern

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Sun, 03 Nov 2024 16:02:25 UTC
The branch stable/14 has been updated by cperciva:

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

commit fffdfe2f6770946bb5d5204df0a97105e1dceccb
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2024-10-22 17:51:57 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2024-11-03 16:01:27 +0000

    gpiobus: Make gpiobus_read_ivar extern
    
    This allows acpi_gpiobus to override the method and fall back to the
    generic gpiobus_read_ivar function if needed.
    
    Reviewed by:    andrew
    MFC after:      1 week
    Sponsored by:   Amazon
    Differential Revision:  https://reviews.freebsd.org/D47250
    
    (cherry picked from commit bc0d10d01c3c69004d600e14d53cd0dceffe4b09)
---
 sys/dev/gpio/gpiobus.c    | 2 +-
 sys/dev/gpio/gpiobusvar.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c
index 7bdb080eb4f1..674a04bc401b 100644
--- a/sys/dev/gpio/gpiobus.c
+++ b/sys/dev/gpio/gpiobus.c
@@ -753,7 +753,7 @@ gpiobus_hinted_child(device_t bus, const char *dname, int dunit)
 	}
 }
 
-static int
+int
 gpiobus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
 {
 	struct gpiobus_ivar *devi;
diff --git a/sys/dev/gpio/gpiobusvar.h b/sys/dev/gpio/gpiobusvar.h
index e3669e82e594..74783e112f89 100644
--- a/sys/dev/gpio/gpiobusvar.h
+++ b/sys/dev/gpio/gpiobusvar.h
@@ -179,6 +179,7 @@ int gpiobus_detach(device_t);
 int gpiobus_init_softc(device_t);
 int gpiobus_alloc_ivars(struct gpiobus_ivar *);
 void gpiobus_free_ivars(struct gpiobus_ivar *);
+int gpiobus_read_ivar(device_t, device_t, int, uintptr_t *);
 int gpiobus_acquire_pin(device_t, uint32_t);
 int gpiobus_release_pin(device_t, uint32_t);