public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] leds: tca6507: Convert to use fwnode_device_is_compatible()
@ 2023-01-19 17:51 Andy Shevchenko
  2023-01-19 20:55 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2023-01-19 17:51 UTC (permalink / raw)
  To: Uwe Kleine-König, linux-leds, linux-kernel
  Cc: Pavel Machek, Lee Jones, Andy Shevchenko

Replace open coded fwnode_device_is_compatible() in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/leds/leds-tca6507.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
index 46e76b894651..07dd12686a69 100644
--- a/drivers/leds/leds-tca6507.c
+++ b/drivers/leds/leds-tca6507.c
@@ -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);
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-19 20:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-19 17:51 [PATCH v1 1/1] leds: tca6507: Convert to use fwnode_device_is_compatible() Andy Shevchenko
2023-01-19 20:55 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox