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

Commit 6f447ddb authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "leds: leds-qpnp-flash: optimization of regulator data parsing"

parents fbcea8c2 67b4a40d
Loading
Loading
Loading
Loading
+10 −11
Original line number Diff line number Diff line
@@ -1037,20 +1037,19 @@ static int flash_regulator_parse_dt(struct qpnp_flash_led *led,
			return rc;
		}

		if (of_find_property(temp, "max-voltage", NULL)) {
		rc = of_property_read_u32(temp, "max-voltage", &val);
		if (!rc) {
			flash_node->reg_data[i].max_volt_uv = val;
			} else {
		} else if (rc != -EINVAL) {
			dev_err(&led->spmi_dev->dev,
					"Unable to read max voltage\n");
			return rc;
		}
		}

		i++;
	}

	return rc;
	return 0;
}

static int flash_regulator_setup(struct qpnp_flash_led *led,
@@ -2425,7 +2424,7 @@ static int qpnp_flash_led_probe(struct spmi_device *spmi)
			goto error_led_register;
		}

		if (&led->flash_node[i].num_regulators) {
		if (led->flash_node[i].num_regulators) {
			rc = flash_regulator_parse_dt(led, &led->flash_node[i]);
			if (rc) {
				dev_err(&led->spmi_dev->dev,