Skip to content

Commit ab4755e

Browse files
nunojsagregkh
authored andcommitted
iio: ad5770r: make devicetree property reading consistent
commit 26df977 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 commit ea52c21 ("dt-bindings: iio: dac: Add docs for AD5770R DAC") and then changed it to 'reg' in commit 2cf3818 ("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: 2cf3818 ("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>
1 parent 6384620 commit ab4755e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/iio/dac/ad5770r.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ static int ad5770r_channel_config(struct ad5770r_state *st)
522522
return -EINVAL;
523523

524524
device_for_each_child_node(&st->spi->dev, child) {
525-
ret = fwnode_property_read_u32(child, "num", &num);
525+
ret = fwnode_property_read_u32(child, "reg", &num);
526526
if (ret)
527527
goto err_child_out;
528528
if (num >= AD5770R_MAX_CHANNELS) {

0 commit comments

Comments
 (0)