]> git.baikalelectronics.ru Git - kernel.git/commit
iio: dac: cio-dac: Cleanup indexing for DAC writes
authorWilliam Breathitt Gray <william.gray@linaro.org>
Thu, 7 Jul 2022 17:21:25 +0000 (13:21 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 16 Jul 2022 17:48:20 +0000 (18:48 +0100)
commitbbc6819c4d156c586cc7e8370429e54a1686011c
treee5e19cc29c949479a5e9e4145a8f4fa80a8ce449
parent5e0508c9e8816bab7b9c62ab4a12818ba3279e86
iio: dac: cio-dac: Cleanup indexing for DAC writes

Simplify DAC write code by defining base member as u16 __iomem *; DAC
registers are 16-bit so this allows us to index each DAC channel
directly in a loop rather than calculating the offsets by multipling by
2 each time.

Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/d9dab6696af7eabb2d46f5cbc7871329f499c1c9.1657213745.git.william.gray@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/cio-dac.c