Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcc3b524 authored by Ashay Jaiswal's avatar Ashay Jaiswal Committed by Abhijeet Dharmapurikar
Browse files

power: qpnp-smbcharger: fix compilation errors for AArch32



64-bit division fails compilation on AArch32 if arithmetic
division operator is directly used for division.
Use div64_s64/do_div APIs for 64-bit division operations.

Change-Id: Id75a89f2f605a86bf0d39e4b87472726aa90b859
Signed-off-by: default avatarAshay Jaiswal <ashayj@codeaurora.org>
parent 21ba67c7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2455,7 +2455,7 @@ static int smbchg_calc_max_flash_current(struct smbchg_chip *chip)
	}
	/* Calculate the input voltage of the flash module. */
	vin_flash_uv = max((chip->vled_max_uv + 500000LL),
				(vph_flash_uv * 1200 / 1000));
				div64_s64((vph_flash_uv * 1200), 1000));
	/* Calculate the available power for the flash module. */
	avail_flash_power_fw = BUCK_EFFICIENCY * vph_flash_uv * ibat_flash_ua;
	/*