summaryrefslogtreecommitdiffstats
path: root/drivers/iio/frequency
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2012-12-06 16:09:00 +0000
committerJonathan Cameron <jic23@kernel.org>2012-12-27 10:59:29 +0000
commit1690970d0d28051e2652d9bae2f73288e017e142 (patch)
treea7509fa1c7bdf63bc08cffdab308529810c48a10 /drivers/iio/frequency
parenta49f0d1ea3ec94fc7cf33a7c36a16343b74bd565 (diff)
downloadlinux-1690970d0d28051e2652d9bae2f73288e017e142.tar.bz2
iio:adf4350: Fix typo
There is a typo in the adf4350 driver turning a shift into a compare. This patch fixes it. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/frequency')
-rw-r--r--drivers/iio/frequency/adf4350.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c
index e35bb8f6fe75..c7de8b5a01ff 100644
--- a/drivers/iio/frequency/adf4350.c
+++ b/drivers/iio/frequency/adf4350.c
@@ -173,7 +173,7 @@ static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq)
} while ((st->r1_mod > ADF4350_MAX_MODULUS) && r_cnt);
} while (r_cnt == 0);
- tmp = freq * (u64)st->r1_mod + (st->fpfd > 1);
+ tmp = freq * (u64)st->r1_mod + (st->fpfd >> 1);
do_div(tmp, st->fpfd); /* Div round closest (n + d/2)/d */
st->r0_fract = do_div(tmp, st->r1_mod);
st->r0_int = tmp;