iio: Use spi_sync_transfer()
Use the new spi_sync_transfer() helper function instead of open-coding it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:

committed by
Jonathan Cameron

parent
6d9eecd418
commit
14543a00fc
@@ -85,11 +85,7 @@ static int ad5504_spi_read(struct spi_device *spi, u8 addr)
|
||||
.rx_buf = &val,
|
||||
.len = 2,
|
||||
};
|
||||
struct spi_message m;
|
||||
|
||||
spi_message_init(&m);
|
||||
spi_message_add_tail(&t, &m);
|
||||
ret = spi_sync(spi, &m);
|
||||
ret = spi_sync_transfer(spi, &t, 1);
|
||||
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user