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

Commit 0f5de04f authored by Kiran Gunda's avatar Kiran Gunda Committed by Gerrit - the friendly Code Review server
Browse files

power: qcom: Fix the 32-bit compilation errors



Use div_s64() for the division operations to avoid the
errors for 32-bit compilation.

Change-Id: I42f4f78f9772b19bbeea6765cba3c2960b54115c
Signed-off-by: default avatarKiran Gunda <kgunda@codeaurora.org>
parent 14681b57
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1224,7 +1224,7 @@ static ssize_t qg_device_write(struct file *file, const char __user *buf,
	}

	if (count != 0 && count < data_size) {
		pr_err("Invalid datasize %zu expected %zu\n", count, data_size);
		pr_err("Invalid datasize %zu expected %lu\n", count, data_size);
		goto fail;
	}

@@ -1336,7 +1336,7 @@ static int get_batt_id_ohm(struct qpnp_qg *chip, u32 *batt_id_ohm)
		return rc;
	}

	batt_id_mv = result.physical / 1000;
	batt_id_mv = div_s64(result.physical, 1000);
	if (batt_id_mv == 0) {
		pr_debug("batt_id_mv = 0 from ADC\n");
		return 0;