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:
Lars-Peter Clausen
2013-01-09 17:31:00 +00:00
committed by Jonathan Cameron
parent 6d9eecd418
commit 14543a00fc
10 changed files with 11 additions and 61 deletions

View File

@@ -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;