Re: [PATCH] iio:adf4350: Fix typo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/06/2012 04:09 PM, Lars-Peter Clausen wrote:
> From: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
added to fixes-togreg branch of iio.git

> ---
>  drivers/iio/frequency/adf4350.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c
> index e35bb8f..c7de8b5 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;
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux