mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
leds: lm3697: Switch to use fwnode_property_count_uXX()
Use fwnode_property_count_uXX() directly, that makes code neater. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
This commit is contained in:
parent
ebefec8d9f
commit
246eab59ee
@ -244,10 +244,7 @@ static int lm3697_probe_dt(struct lm3697 *priv)
|
||||
led->lmu_data.lsb_brightness_reg = LM3697_CTRL_A_BRT_LSB +
|
||||
led->control_bank * 2;
|
||||
|
||||
led->num_leds = fwnode_property_read_u32_array(child,
|
||||
"led-sources",
|
||||
NULL, 0);
|
||||
|
||||
led->num_leds = fwnode_property_count_u32(child, "led-sources");
|
||||
if (led->num_leds > LM3697_MAX_LED_STRINGS) {
|
||||
dev_err(&priv->client->dev, "To many LED strings defined\n");
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user