diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-01-09 17:31:00 +0000 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-02-09 11:10:43 +0000 |
commit | ad6c46b0c712e0d8fd8a80ee372b30f14a781888 (patch) | |
tree | 08a9dda620d1cc0280400b15ab518d30d374d68a /drivers/staging/iio/adc | |
parent | 14543a00fc3ce6dac9f297535c502a0085a50467 (diff) |
staging: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/staging/iio/adc')
-rw-r--r-- | drivers/staging/iio/adc/ad7280a.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c index fa81a491e790..1f190c1b12a6 100644 --- a/drivers/staging/iio/adc/ad7280a.c +++ b/drivers/staging/iio/adc/ad7280a.c @@ -199,12 +199,8 @@ static int __ad7280_read32(struct spi_device *spi, unsigned *val) .rx_buf = &rx_buf, .len = 4, }; - 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) return ret; |