Skip to contentSkip to conversation

gpio: shared: use device_is_compatible() for reset-gpio

PATCH Applied Bartosz Golaszewski 2 participants 3 messages Jan 12 – Jan 13 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpio/gpiolib-shared.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpio/gpiolib-shared.c +1 -6
index 076d8642675c..c97229c90c91 100644
@@ -451,12 +451,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)) {
Signature · 1 line
2.47.3
author Applied
#2 lore raw
In reply to Bartosz Golaszewski
Quoted 4 lines · Bartosz Golaszewski

reset-gpio devices now can be identified with device_is_compatible() so use it instead of checking the device name string.

Applied, thanks!

[1/1] gpio: shared: use device_is_compatible() for reset-gpio

      commit: 568ea51e61f7da72ee290d24d6ee952586a3e168

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>