summaryrefslogtreecommitdiffstats
path: root/drivers/iio/gyro/adxrs450.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/gyro/adxrs450.c')
-rw-r--r--drivers/iio/gyro/adxrs450.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iio/gyro/adxrs450.c b/drivers/iio/gyro/adxrs450.c
index d9d43831c380..5b79953f7011 100644
--- a/drivers/iio/gyro/adxrs450.c
+++ b/drivers/iio/gyro/adxrs450.c
@@ -213,7 +213,6 @@ error_ret:
static int adxrs450_spi_initial(struct adxrs450_state *st,
u32 *val, char chk)
{
- struct spi_message msg;
int ret;
u32 tx;
struct spi_transfer xfers = {
@@ -228,9 +227,7 @@ static int adxrs450_spi_initial(struct adxrs450_state *st,
if (chk)
tx |= (ADXRS450_CHK | ADXRS450_P);
st->tx = cpu_to_be32(tx);
- spi_message_init(&msg);
- spi_message_add_tail(&xfers, &msg);
- ret = spi_sync(st->us, &msg);
+ ret = spi_sync_transfer(st->us, &xfers, 1);
if (ret) {
dev_err(&st->us->dev, "Problem while reading initializing data\n");
goto error_ret;
OpenPOWER on IntegriCloud