Re: rtl2830: __udivdi3 undefined

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

 



On Sun, Mar 4, 2012 at 23:19, Gianluca Gennari <gennarone@xxxxxxxxx> wrote:
> Probably the best solution is to use div_u64.
> The following patch fixed the warning on my 32 bit system.
>
> Signed-off-by: Gianluca Gennari <gennarone@xxxxxxxxx>

Thanks, that fixes it (div_u64() is do_div() on 32-bit).

Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

> ---
>  drivers/media/dvb/frontends/rtl2830.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/dvb/frontends/rtl2830.c
> b/drivers/media/dvb/frontends/rtl2830.c
> index f971d94..45196c5 100644
> --- a/drivers/media/dvb/frontends/rtl2830.c
> +++ b/drivers/media/dvb/frontends/rtl2830.c
> @@ -244,7 +244,7 @@ static int rtl2830_init(struct dvb_frontend *fe)
>
>        num = priv->cfg.if_dvbt % priv->cfg.xtal;
>        num *= 0x400000;
> -       num /= priv->cfg.xtal;
> +       num = div_u64(num, priv->cfg.xtal);
>        num = -num;
>        if_ctl = num & 0x3fffff;
>        dbg("%s: if_ctl=%08x", __func__, if_ctl);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux