diff options
author | Jiri Kosina <jkosina@suse.cz> | 2013-03-18 13:57:32 +0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-03-18 13:57:57 +0400 |
commit | aa1262b3876ec5249ff464618a7dcd46b3ca54e2 (patch) | |
tree | b150bb2c83c073e1f0e298ba7899148f7d991ef7 /drivers/iio/dac/ad5764.c | |
parent | 806b2139db236e0cbd0b5833ab0ce139f0196bcd (diff) | |
parent | 6dbe51c251a327e012439c4772097a13df43c5b8 (diff) | |
download | linux-aa1262b3876ec5249ff464618a7dcd46b3ca54e2.tar.xz |
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply patch to the newly
added ITG-3200 driver.
Diffstat (limited to 'drivers/iio/dac/ad5764.c')
-rw-r--r-- | drivers/iio/dac/ad5764.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/iio/dac/ad5764.c b/drivers/iio/dac/ad5764.c index 7f9045e6daa4..5b7acd3a2c77 100644 --- a/drivers/iio/dac/ad5764.c +++ b/drivers/iio/dac/ad5764.c @@ -135,7 +135,6 @@ static int ad5764_read(struct iio_dev *indio_dev, unsigned int reg, unsigned int *val) { struct ad5764_state *st = iio_priv(indio_dev); - struct spi_message m; int ret; struct spi_transfer t[] = { { @@ -148,15 +147,11 @@ static int ad5764_read(struct iio_dev *indio_dev, unsigned int reg, }, }; - spi_message_init(&m); - spi_message_add_tail(&t[0], &m); - spi_message_add_tail(&t[1], &m); - mutex_lock(&indio_dev->mlock); st->data[0].d32 = cpu_to_be32((1 << 23) | (reg << 16)); - ret = spi_sync(st->spi, &m); + ret = spi_sync_transfer(st->spi, t, ARRAY_SIZE(t)); if (ret >= 0) *val = be32_to_cpu(st->data[1].d32) & 0xffff; |