From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Lars-Peter Clausen , Alexandru Ardelean , "Stable@vger.kernel.org" , Jonathan Cameron , Sasha Levin Subject: [PATCH AUTOSEL 4.18 37/88] iio: ad9523: Fix displayed phase Date: Fri, 7 Sep 2018 00:36:19 +0000 Message-ID: <20180907003547.57567-37-alexander.levin@microsoft.com> References: <20180907003547.57567-1-alexander.levin@microsoft.com> In-Reply-To: <20180907003547.57567-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: From: Lars-Peter Clausen [ Upstream commit 5a4e33c1c53ae7d4425f7d94e60e4458a37b349e ] 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 Signed-off-by: Alexandru Ardelean Fixes: cd1678f9632 ("iio: frequency: New driver for AD9523 SPI Low Jitter C= lock Generator") Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- drivers/iio/frequency/ad9523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.= c index ddb6a334ae68..d5b2c231a661 100644 --- a/drivers/iio/frequency/ad9523.c +++ b/drivers/iio/frequency/ad9523.c @@ -642,7 +642,7 @@ static int ad9523_read_raw(struct iio_dev *indio_dev, code =3D (AD9523_CLK_DIST_DIV_PHASE_REV(ret) * 3141592) / AD9523_CLK_DIST_DIV_REV(ret); *val =3D code / 1000000; - *val2 =3D (code % 1000000) * 10; + *val2 =3D code % 1000000; return IIO_VAL_INT_PLUS_MICRO; default: return -EINVAL; --=20 2.17.1