Skip to content

Commit

Permalink
staging:iio:hmc5843: Use i2c_smbus_read_word_swapped()
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Peter Meerwald authored and Jonathan Cameron committed Aug 4, 2013
1 parent f70d669 commit cd6fe06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/iio/magnetometer/hmc5843.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ static int hmc5843_read_measurement(struct iio_dev *indio_dev,
return -EIO;
}

result = i2c_smbus_read_word_data(client, address);
result = i2c_smbus_read_word_swapped(client, address);
mutex_unlock(&data->lock);
if (result < 0)
return -EINVAL;

*val = (s16)swab16((u16)result);
*val = result;
return IIO_VAL_INT;
}

Expand Down

0 comments on commit cd6fe06

Please sign in to comment.