Skip to contentSkip to conversation

leds: tca6507: Convert to use fwnode_device_is_compatible()

PATCH Applied Andy Shevchenko 2 participants 2 messages Jan 19, 2023 LED

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 leds: tca6507: Convert to use fwnode_device_is_compatible()

Replace open coded fwnode_device_is_compatible() in the driver.

---
 drivers/leds/leds-tca6507.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/leds/leds-tca6507.c +1 -2
index 46e76b894651..07dd12686a69 100644
@@ -695,8 +695,7 @@ tca6507_led_dt_init(struct device *dev)
 					    &led.default_trigger);
 
 		led.flags = 0;
-		if (fwnode_property_match_string(child, "compatible",
-						 "gpio") >= 0)
+		if (fwnode_device_is_compatible(child, "gpio"))
 			led.flags |= TCA6507_MAKE_GPIO;
 
 		ret = fwnode_property_read_u32(child, "reg", &reg);
Signature · 1 line
2.39.0
maintainer Applied
#1 lore raw
Quoted 6 lines · Andy Shevchenko

Replace open coded fwnode_device_is_compatible() in the driver.

---
 drivers/leds/leds-tca6507.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied, thanks

Signature · 1 line
Lee Jones [李琼斯]