[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230119175150.77250-1-andriy.shevchenko@linux.intel.com>
Date: Thu, 19 Jan 2023 19:51:50 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, linux-leds@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Pavel Machek <pavel@....cz>, Lee Jones <lee@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH v1 1/1] leds: tca6507: Convert to use fwnode_device_is_compatible()
Replace open coded fwnode_device_is_compatible() in the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.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", ®);
--
2.39.0
Powered by blists - more mailing lists