2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-10 22:54:11 +08:00

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@linux.intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230119175150.77250-1-andriy.shevchenko@linux.intel.com
This commit is contained in:
Andy Shevchenko 2023-01-19 19:51:50 +02:00 committed by Lee Jones
parent 265d313ee6
commit 8f47707acd

View File

@ -695,8 +695,7 @@ tca6507_led_dt_init(struct device *dev)
&led.default_trigger); &led.default_trigger);
led.flags = 0; led.flags = 0;
if (fwnode_property_match_string(child, "compatible", if (fwnode_device_is_compatible(child, "gpio"))
"gpio") >= 0)
led.flags |= TCA6507_MAKE_GPIO; led.flags |= TCA6507_MAKE_GPIO;
ret = fwnode_property_read_u32(child, "reg", &reg); ret = fwnode_property_read_u32(child, "reg", &reg);