Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <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>

+1 -6
+1 -6
drivers/gpio/gpiolib-shared.c
··· 455 455 list_for_each_entry(ref, &entry->refs, list) { 456 456 guard(mutex)(&ref->lock); 457 457 458 - /* 459 - * FIXME: use device_is_compatible() once the reset-gpio 460 - * drivers gains a compatible string which it currently 461 - * does not have. 462 - */ 463 - if (!ref->fwnode && strstarts(dev_name(consumer), "reset.gpio.")) { 458 + if (!ref->fwnode && device_is_compatible(consumer, "reset-gpio")) { 464 459 if (!gpio_shared_dev_is_reset_gpio(consumer, entry, ref)) 465 460 continue; 466 461 } else if (!device_match_fwnode(consumer, ref->fwnode)) {