iio: adc: pac1934: Use device_for_each_available_child_node_scoped() to simplify...
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 30 Mar 2024 19:08:49 +0000 (19:08 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 6 Apr 2024 10:29:06 +0000 (11:29 +0100)
commit2eef045c5231658b3d7514c6640951e0de3e9d05
treeb4d1151dbf1b765306c26f833e5e260b610e962b
parentbcf571a854d4a91617d688015277525edfbc30fb
iio: adc: pac1934: Use device_for_each_available_child_node_scoped() to simplify error handling.

Also change both firmware parsing functions to return meaningful errors.
Whilst for the ACPI case this isn't that useful, for the generic fwnode
case we can return the errors coming from the property parsing instead
of just whether we succeeded or not.

Cc: Marius Cristea <marius.cristea@microchip.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240330190849.1321065-9-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/pac1934.c