mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-20 17:41:09 +00:00
iio: ad5770r: make devicetree property reading consistent
commit26df977a90
upstream. The bindings file for this driver is defining the property as 'reg' but the driver was reading it with the 'num' name. The bindings actually had the 'num' property when added in commitea52c21268
("dt-bindings: iio: dac: Add docs for AD5770R DAC") and then changed it to 'reg' in commit2cf3818f18
("dt-bindings: iio: dac: AD5570R fix bindings errors"). However, both these commits landed in v5.7 so the assumption is that either 'num' is not being used or if it is, the validations were not done. Anyways, if someone comes back yelling about this, we might just support both of the properties in the future. Not ideal, but that's life... Fixes:2cf3818f18
("dt-bindings: iio: dac: AD5570R fix bindings errors") Signed-off-by: Nuno Sá <nuno.sa@analog.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210818080525.62790-1-nuno.sa@analog.com Cc: Stable@vger.kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a92d075cb4
commit
df56942798
1 changed files with 1 additions and 1 deletions
|
@ -522,7 +522,7 @@ static int ad5770r_channel_config(struct ad5770r_state *st)
|
|||
return -EINVAL;
|
||||
|
||||
device_for_each_child_node(&st->spi->dev, child) {
|
||||
ret = fwnode_property_read_u32(child, "num", &num);
|
||||
ret = fwnode_property_read_u32(child, "reg", &num);
|
||||
if (ret)
|
||||
goto err_child_out;
|
||||
if (num >= AD5770R_MAX_CHANNELS) {
|
||||
|
|
Loading…
Reference in a new issue