leds: Use fwnode_for_each_child_node() instead
fwnode_for_each_child_node() is now the same as fwnode_for_each_available_child_node() on all backends (OF, ACPI and swnode). In order to remove the available variants, switch the uses to non-available variants. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Lee Jones <lee@kernel.org>pull/1354/merge
parent
e39d87fd28
commit
3b6eaa3db5
|
|
@ -60,7 +60,7 @@ static int max5970_led_probe(struct platform_device *pdev)
|
||||||
if (!led_node)
|
if (!led_node)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
fwnode_for_each_available_child_node(led_node, child) {
|
fwnode_for_each_child_node(led_node, child) {
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
||||||
if (fwnode_property_read_u32(child, "reg", ®))
|
if (fwnode_property_read_u32(child, "reg", ®))
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ static int max77705_add_led(struct device *dev, struct regmap *regmap, struct fw
|
||||||
cdev->brightness_set_blocking = max77705_led_brightness_set_multi;
|
cdev->brightness_set_blocking = max77705_led_brightness_set_multi;
|
||||||
cdev->blink_set = max77705_rgb_blink;
|
cdev->blink_set = max77705_rgb_blink;
|
||||||
|
|
||||||
fwnode_for_each_available_child_node(np, child) {
|
fwnode_for_each_child_node(np, child) {
|
||||||
ret = max77705_parse_subled(dev, child, &info[i]);
|
ret = max77705_parse_subled(dev, child, &info[i]);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
|
|
@ -391,7 +391,7 @@ static int ktd202x_setup_led_rgb(struct ktd202x *chip, struct fwnode_handle *fwn
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
num_channels = 0;
|
num_channels = 0;
|
||||||
fwnode_for_each_available_child_node(fwnode, child)
|
fwnode_for_each_child_node(fwnode, child)
|
||||||
num_channels++;
|
num_channels++;
|
||||||
|
|
||||||
if (!num_channels || num_channels > chip->num_leds)
|
if (!num_channels || num_channels > chip->num_leds)
|
||||||
|
|
@ -401,7 +401,7 @@ static int ktd202x_setup_led_rgb(struct ktd202x *chip, struct fwnode_handle *fwn
|
||||||
if (!info)
|
if (!info)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
fwnode_for_each_available_child_node(fwnode, child) {
|
fwnode_for_each_child_node(fwnode, child) {
|
||||||
u32 mono_color;
|
u32 mono_color;
|
||||||
u32 reg;
|
u32 reg;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ static int ncp5623_probe(struct i2c_client *client)
|
||||||
goto release_mc_node;
|
goto release_mc_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
fwnode_for_each_available_child_node(mc_node, led_node) {
|
fwnode_for_each_child_node(mc_node, led_node) {
|
||||||
ret = fwnode_property_read_u32(led_node, "color", &color_index);
|
ret = fwnode_property_read_u32(led_node, "color", &color_index);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto release_led_node;
|
goto release_led_node;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue