diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-01-09 18:31:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-02-09 12:08:42 +0100 |
commit | 14543a00fc3ce6dac9f297535c502a0085a50467 (patch) | |
tree | 1c244bcc56bd4a48ee2c305856457d102d6eccbe /drivers/iio/dac/ad5504.c | |
parent | spi: Add helper functions for setting up transfers (diff) | |
download | linux-14543a00fc3ce6dac9f297535c502a0085a50467.tar.xz linux-14543a00fc3ce6dac9f297535c502a0085a50467.zip |
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>
Diffstat (limited to 'drivers/iio/dac/ad5504.c')
-rw-r--r-- | drivers/iio/dac/ad5504.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c index 0661829f2773..e5e59749f109 100644 --- a/drivers/iio/dac/ad5504.c +++ b/drivers/iio/dac/ad5504.c @@ -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; |