Commit 134ada17 authored by Guru Das Srinagesh's avatar Guru Das Srinagesh Committed by Thierry Reding

backlight: pwm_bl: Use 64-bit division function

Since the PWM framework is switching struct pwm_state.period's datatype
to u64, prepare for this transition by using div_u64 to handle a 64-bit
dividend instead of a straight division operation.
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent c7dcccae
......@@ -606,7 +606,8 @@ static int pwm_backlight_probe(struct platform_device *pdev)
pb->scale = data->max_brightness;
}
pb->lth_brightness = data->lth_brightness * (state.period / pb->scale);
pb->lth_brightness = data->lth_brightness * (div_u64(state.period,
pb->scale));
props.type = BACKLIGHT_RAW;
props.max_brightness = data->max_brightness;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment