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

V4L/DVB (12427): cx24113: fix mips compiler warning

do_div requires an u64 as the first argument, not a s64.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
eb2de30b f19b56a8

+5 -1
+5 -1
drivers/media/dvb/frontends/cx24113.c
··· 303 303 { 304 304 s32 N; 305 305 s64 F; 306 + u64 dividend; 306 307 u8 R, r; 307 308 u8 vcodiv; 308 309 u8 factor; ··· 347 346 F = freq_hz; 348 347 F *= (u64) (R * vcodiv * 262144); 349 348 dprintk("1 N: %d, F: %lld, R: %d\n", N, (long long)F, R); 350 - do_div(F, state->config->xtal_khz*1000 * factor * 2); 349 + /* do_div needs an u64 as first argument */ 350 + dividend = F; 351 + do_div(dividend, state->config->xtal_khz * 1000 * factor * 2); 352 + F = dividend; 351 353 dprintk("2 N: %d, F: %lld, R: %d\n", N, (long long)F, R); 352 354 F -= (N + 32) * 262144; 353 355