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

Commit 46767a42 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: qpnp-qnovo5: Fix ok_to_qnovo class param"

parents dc7eade7 2ca0af79
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -668,9 +668,17 @@ static ssize_t ok_to_qnovo_show(struct class *c, struct class_attribute *attr,
			char *buf)
{
	struct qnovo *chip = container_of(c, struct qnovo, qnovo_class);
	int val = get_effective_result(chip->not_ok_to_qnovo_votable);
	int val, cp_dis, not_ok =
		get_effective_result(chip->not_ok_to_qnovo_votable);
	struct votable *cp_disable_votable = find_votable("CP_DISABLE");

	val = !not_ok;
	if (cp_disable_votable) {
		cp_dis = get_effective_result(cp_disable_votable);
		val = val && cp_dis;
	}

	return snprintf(buf, PAGE_SIZE, "%d\n", !val);
	return scnprintf(buf, PAGE_SIZE, "%d\n", val);
}
static CLASS_ATTR_RO(ok_to_qnovo);