From: Bartosz Golaszewski Date: Mon, 12 Jan 2026 09:36:51 +0000 (+0100) Subject: gpio: shared: use device_is_compatible() for reset-gpio X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=568ea51e61f7da72ee290d24d6ee952586a3e168;p=thirdparty%2Fkernel%2Flinux.git gpio: shared: use device_is_compatible() for reset-gpio 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 Link: https://lore.kernel.org/r/20260112093651.23639-1-bartosz.golaszewski@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c index 17343fdc97584..fb8f779ed774e 100644 --- a/drivers/gpio/gpiolib-shared.c +++ b/drivers/gpio/gpiolib-shared.c @@ -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)) {