leds-aw2013.c (8853c95e997e0a3621bd8718bdaded81ed37bc9a) | leds-aw2013.c (99a013c840a05083fd82d220685af7579238bfa8) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2// Driver for Awinic AW2013 3-channel LED driver 3 4#include <linux/i2c.h> 5#include <linux/leds.h> 6#include <linux/module.h> 7#include <linux/regulator/consumer.h> 8#include <linux/mutex.h> --- 251 unchanged lines hidden (view full) --- 260} 261 262static int aw2013_probe_dt(struct aw2013 *chip) 263{ 264 struct device_node *np = dev_of_node(&chip->client->dev), *child; 265 int count, ret = 0, i = 0; 266 struct aw2013_led *led; 267 | 1// SPDX-License-Identifier: GPL-2.0+ 2// Driver for Awinic AW2013 3-channel LED driver 3 4#include <linux/i2c.h> 5#include <linux/leds.h> 6#include <linux/module.h> 7#include <linux/regulator/consumer.h> 8#include <linux/mutex.h> --- 251 unchanged lines hidden (view full) --- 260} 261 262static int aw2013_probe_dt(struct aw2013 *chip) 263{ 264 struct device_node *np = dev_of_node(&chip->client->dev), *child; 265 int count, ret = 0, i = 0; 266 struct aw2013_led *led; 267 |
268 count = of_get_child_count(np); | 268 count = of_get_available_child_count(np); |
269 if (!count || count > AW2013_MAX_LEDS) 270 return -EINVAL; 271 272 regmap_write(chip->regmap, AW2013_RSTR, AW2013_RSTR_RESET); 273 274 for_each_available_child_of_node(np, child) { 275 struct led_init_data init_data = {}; 276 u32 source; --- 160 unchanged lines hidden --- | 269 if (!count || count > AW2013_MAX_LEDS) 270 return -EINVAL; 271 272 regmap_write(chip->regmap, AW2013_RSTR, AW2013_RSTR_RESET); 273 274 for_each_available_child_of_node(np, child) { 275 struct led_init_data init_data = {}; 276 u32 source; --- 160 unchanged lines hidden --- |