summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-01-19 18:51:50 +0100
committerLee Jones <lee@kernel.org>2023-01-30 09:03:43 +0100
commit8f47707acd0b65a9e797bc7288a9183131d5ce74 (patch)
treefd6001dcb93a1ee616d23af7e737f4c0518e1bf0 /drivers/leds
parentleds: syscon: Get rid of custom led_init_default_state_get() (diff)
downloadlinux-8f47707acd0b65a9e797bc7288a9183131d5ce74.tar.xz
linux-8f47707acd0b65a9e797bc7288a9183131d5ce74.zip
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
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-tca6507.c3
1 files changed, 1 insertions, 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);