From: Alan Cox Date: Mon, 6 Mar 2017 11:48:30 +0000 (+0000) Subject: atomisp: fix __udiv warning X-Git-Tag: v5.15~11366^2~770 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91b0faa50cc12b343a6e728a90f03517d9dc6740;p=platform%2Fkernel%2Flinux-starfive.git atomisp: fix __udiv warning Certain combinations of compiler and compiler options product an imx.o that calls compiler helpers for a u64 divide. Use the do_div() call instead. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/media/atomisp/i2c/imx/imx.c b/drivers/staging/media/atomisp/i2c/imx/imx.c index 47286de..f6e12c6 100644 --- a/drivers/staging/media/atomisp/i2c/imx/imx.c +++ b/drivers/staging/media/atomisp/i2c/imx/imx.c @@ -819,13 +819,14 @@ static int imx_get_intg_factor(struct i2c_client *client, if (dev->sensor_id == IMX132_ID || dev->sensor_id == IMX208_ID) vt_pix_clk_freq_mhz = ext_clk_freq_hz / div; - else if (dev->sensor_id == IMX227_ID) + else if (dev->sensor_id == IMX227_ID) { /* according to IMX227 datasheet: * vt_pix_freq_mhz = * num_of_vt_lanes(4) * ivt_pix_clk_freq_mhz */ vt_pix_clk_freq_mhz = - (u64)4 * ext_clk_freq_hz * pll_multiplier / div; - else + (u64)4 * ext_clk_freq_hz * pll_multiplier; + do_div(vt_pix_clk_freq_mhz, div); + } else vt_pix_clk_freq_mhz = 2 * ext_clk_freq_hz / div; vt_pix_clk_freq_mhz *= pll_multiplier;