Skip to content

Commit

Permalink
staging:iio:ad7476: Use be16_to_cpup instead of open-coding it
Browse files Browse the repository at this point in the history
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Sep 15, 2012
1 parent 7a28fe3 commit 610a407
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/adc/ad7476.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static int ad7476_scan_direct(struct ad7476_state *st)
if (ret)
return ret;

return (st->data[0] << 8) | st->data[1];
return be16_to_cpup((__be16 *)st->data);
}

static int ad7476_read_raw(struct iio_dev *indio_dev,
Expand Down

0 comments on commit 610a407

Please sign in to comment.