From aba9ed2d3e786003cd675184a1309a3034ae1bea Mon Sep 17 00:00:00 2001 From: ansharma Date: Fri, 2 Sep 2016 14:10:20 +0530 Subject: [PATCH] leds: qpnp-flash-v2: Fix compilation issue for 32-bit kernel Use div64_s64() instead of direct division required for 32-bit kernel compilation. CRs-Fixed: 1070141 Change-Id: I9f58a411c2a923c07fd27ab9dc5ac244e4b13a44 Signed-off-by: ansharma --- drivers/leds/leds-qpnp-flash-v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/leds-qpnp-flash-v2.c b/drivers/leds/leds-qpnp-flash-v2.c index 2f7529814cd9..0cae5d2e5263 100644 --- a/drivers/leds/leds-qpnp-flash-v2.c +++ b/drivers/leds/leds-qpnp-flash-v2.c @@ -594,7 +594,7 @@ static int qpnp_flash_led_calc_max_current(struct qpnp_flash_led *led) avail_flash_ua, ocv_uv, ibat_now, rbatt_uohm, led->trigger_lmh); return min(FLASH_LED_MAX_TOTAL_CURRENT_MA, - (int)(avail_flash_ua / MCONV)); + (int)(div64_s64(avail_flash_ua, MCONV))); } static int qpnp_flash_led_calc_thermal_current_lim(struct qpnp_flash_led *led)