]> git.ipfire.org Git - thirdparty/linux.git/commit
iio: dac: ad5446: Make use of the cleanup helpers
authorNuno Sá <nuno.sa@analog.com>
Tue, 4 Nov 2025 15:35:14 +0000 (15:35 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 9 Nov 2025 16:18:01 +0000 (16:18 +0000)
commit308d4474cfa298dbf4a7e4f18314a86c38a51da1
treeaef3a8e065ac96de39e8ebf321ef90e4465332e9
parent6e43c10675d876a5fb71e57a9bcca9533fccccd9
iio: dac: ad5446: Make use of the cleanup helpers

Use the auto unlocking helpers from cleanup.h. Allows for some code
simplification.

While at it, don't use the ternary operator in
ad5446_write_dac_powerdown() and add an helper function to write the DAC
code. The reason for the function was purely to avoid having to use
unreachable().

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/ad5446.c