The branch main has been updated by vexeduxr:

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

commit 7f297cdae380022bcdc72b3b11d1ecb7a902e578
Author:     Ahmad Khalifa <vexed...@freebsd.org>
AuthorDate: 2025-07-04 20:03:10 +0000
Commit:     Ahmad Khalifa <vexed...@freebsd.org>
CommitDate: 2025-07-04 20:24:31 +0000

    regulator: don't use internal gpiobus function
    
    gpiobus_acquire_pin is only meant to be used internally by gpiobus. Use
    gpio_pin_acquire instead.
    
    Reviewed by:    manu, mmel
    Approved by:    imp (mentor)
    Differential Revision:  https://reviews.freebsd.org/D50870
---
 sys/dev/regulator/regulator_fixed.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/sys/dev/regulator/regulator_fixed.c 
b/sys/dev/regulator/regulator_fixed.c
index 0a76da7140a0..55cdb5e4aeae 100644
--- a/sys/dev/regulator/regulator_fixed.c
+++ b/sys/dev/regulator/regulator_fixed.c
@@ -100,12 +100,8 @@ static struct gpio_entry *
 regnode_get_gpio_entry(struct gpiobus_pin *gpio_pin)
 {
        struct gpio_entry *entry, *tmp;
-       device_t busdev;
        int rv;
 
-       busdev = GPIO_GET_BUS(gpio_pin->dev);
-       if (busdev == NULL)
-               return (NULL);
        entry = malloc(sizeof(struct gpio_entry), M_FIXEDREGULATOR,
            M_WAITOK | M_ZERO);
 
@@ -122,8 +118,8 @@ regnode_get_gpio_entry(struct gpiobus_pin *gpio_pin)
        }
 
        /* Reserve pin. */
-       /* XXX Can we call gpiobus_acquire_pin() with gpio_list_mtx held? */
-       rv = gpiobus_acquire_pin(busdev, gpio_pin->pin);
+       /* XXX Can we call gpio_pin_acquire() with gpio_list_mtx held? */
+       rv = gpio_pin_acquire(gpio_pin);
        if (rv != 0) {
                mtx_unlock(&gpio_list_mtx);
                free(entry, M_FIXEDREGULATOR);

Reply via email to