summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoransharma <ansharma@codeaurora.org>2016-09-02 14:10:20 +0530
committeransharma <ansharma@codeaurora.org>2016-09-23 16:12:21 +0530
commitaba9ed2d3e786003cd675184a1309a3034ae1bea (patch)
treecb4aab967a0de00347fa2f16b24c008a6fa85372
parent9e2d528dc47d04e98c5e6f1c4ef84fc268115d36 (diff)
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 <ansharma@codeaurora.org>
-rw-r--r--drivers/leds/leds-qpnp-flash-v2.c2
1 files changed, 1 insertions, 1 deletions
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)