diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2018-06-25 11:03:07 +0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2018-12-16 22:08:20 +0000 |
commit | f4ad34c7ecaa299f8478a6f220e9ef5474ae835b (patch) | |
tree | 59af7e1e7d26796a3c9f2c2bc4df483961d996bf | |
parent | 9ba687a9f8686a9658ba106f7240789a4c2a920f (diff) | |
download | linux-stable-f4ad34c7ecaa299f8478a6f220e9ef5474ae835b.tar.gz linux-stable-f4ad34c7ecaa299f8478a6f220e9ef5474ae835b.tar.bz2 linux-stable-f4ad34c7ecaa299f8478a6f220e9ef5474ae835b.zip |
iio: ad9523: Fix displayed phase
commit 5a4e33c1c53ae7d4425f7d94e60e4458a37b349e upstream.
Fix the displayed phase for the ad9523 driver. Currently the most
significant decimal place is dropped and all other digits are shifted one
to the left. This is due to a multiplication by 10, which is not necessary,
so remove it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Fixes: cd1678f9632 ("iio: frequency: New driver for AD9523 SPI Low Jitter Clock Generator")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/iio/frequency/ad9523.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c index 7c5245d9f99c..abc21d913ef0 100644 --- a/drivers/iio/frequency/ad9523.c +++ b/drivers/iio/frequency/ad9523.c @@ -641,7 +641,7 @@ static int ad9523_read_raw(struct iio_dev *indio_dev, code = (AD9523_CLK_DIST_DIV_PHASE_REV(ret) * 3141592) / AD9523_CLK_DIST_DIV_REV(ret); *val = code / 1000000; - *val2 = (code % 1000000) * 10; + *val2 = code % 1000000; return IIO_VAL_INT_PLUS_MICRO; default: return -EINVAL; |