staging:iio:cdc:ad7150: use swapped reads/writes for i2c rather than open coding
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 14 Mar 2021 18:14:48 +0000 (18:14 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 7 Apr 2021 07:36:35 +0000 (08:36 +0100)
commitadd538f4beb25c8334aa40cab6cfe066e836151f
tree65281779d9afce00c58f666aa2a90ea2887f1e6f
parenta71654af0a2199503c02e996b386d335158e0818
staging:iio:cdc:ad7150: use swapped reads/writes for i2c rather than open coding

Reduces boilerplate and chances of getting the error handling wrong.
No functional change.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Barry Song <song.bao.hua@hisilicon>
Link: https://lore.kernel.org/r/20210314181511.531414-2-jic23@kernel.org
drivers/staging/iio/cdc/ad7150.c