From f8db99ebacdaf3ae9e0bac7b7920a67016cf0e83 Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Mon, 14 Dec 2020 20:55:54 +0800 Subject: [PATCH] media: i2c: hall-dc-motor: fix compilation issue on 32bit ERROR: "__aeabi_uldivmod" [drivers/media/i2c/hall-dc-motor.ko] undefined! Fixes: a73b62eb5943 ("media: add hall-dc-motor driver for camera iris") Signed-off-by: Tao Huang Change-Id: I22fec672086f1187da795a510373eb3ee579e1f2 --- drivers/media/i2c/hall-dc-motor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/hall-dc-motor.c b/drivers/media/i2c/hall-dc-motor.c index 284a633d70db..1f43b0a05d85 100644 --- a/drivers/media/i2c/hall-dc-motor.c +++ b/drivers/media/i2c/hall-dc-motor.c @@ -92,7 +92,7 @@ static int motor_s_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_IRIS_ABSOLUTE: motor->pwm_state.enabled = true; motor->pwm_state.duty_cycle = - (u64)motor->pwm_state.period * ctrl->val / IRIS_MAX_LOG; + div64_u64((u64)motor->pwm_state.period * ctrl->val, IRIS_MAX_LOG); pwm_apply_state(motor->pwm, &motor->pwm_state); dev_dbg(motor->dev, "iris, ctrl->val %d, pwm duty %lld, period %lld, polarity %d\n", ctrl->val,