Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Michael Hennerich and committed by
Jonathan Cameron
1690970d a49f0d1e

+1 -1
+1 -1
drivers/iio/frequency/adf4350.c
··· 173 173 } while ((st->r1_mod > ADF4350_MAX_MODULUS) && r_cnt); 174 174 } while (r_cnt == 0); 175 175 176 - tmp = freq * (u64)st->r1_mod + (st->fpfd > 1); 176 + tmp = freq * (u64)st->r1_mod + (st->fpfd >> 1); 177 177 do_div(tmp, st->fpfd); /* Div round closest (n + d/2)/d */ 178 178 st->r0_fract = do_div(tmp, st->r1_mod); 179 179 st->r0_int = tmp;