]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpio: shared: use device_is_compatible() for reset-gpio
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Mon, 12 Jan 2026 09:36:51 +0000 (10:36 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Tue, 13 Jan 2026 09:32:17 +0000 (10:32 +0100)
reset-gpio devices now can be identified with device_is_compatible() so
use it instead of checking the device name string.

Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://lore.kernel.org/r/20260112093651.23639-1-bartosz.golaszewski@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpiolib-shared.c

index 17343fdc9758402b3cc7c8d61ee908591c977539..fb8f779ed774ed8d7c1223dab38ac620037dd0de 100644 (file)
@@ -455,12 +455,7 @@ int gpio_shared_add_proxy_lookup(struct device *consumer, const char *con_id,
                list_for_each_entry(ref, &entry->refs, list) {
                        guard(mutex)(&ref->lock);
 
-                       /*
-                        * FIXME: use device_is_compatible() once the reset-gpio
-                        * drivers gains a compatible string which it currently
-                        * does not have.
-                        */
-                       if (!ref->fwnode && strstarts(dev_name(consumer), "reset.gpio.")) {
+                       if (!ref->fwnode && device_is_compatible(consumer, "reset-gpio")) {
                                if (!gpio_shared_dev_is_reset_gpio(consumer, entry, ref))
                                        continue;
                        } else if (!device_match_fwnode(consumer, ref->fwnode)) {