Skip to content

Commit 568ea51

Browse files
author
Bartosz Golaszewski
committed
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 parent 4d94418 commit 568ea51

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

drivers/gpio/gpiolib-shared.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -455,12 +455,7 @@ int gpio_shared_add_proxy_lookup(struct device *consumer, const char *con_id,
455455
list_for_each_entry(ref, &entry->refs, list) {
456456
guard(mutex)(&ref->lock);
457457

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")) {
464459
if (!gpio_shared_dev_is_reset_gpio(consumer, entry, ref))
465460
continue;
466461
} else if (!device_match_fwnode(consumer, ref->fwnode)) {

0 commit comments

Comments
 (0)