Commit 7fb2e707 authored by Ricardo Rivera-Matos's avatar Ricardo Rivera-Matos Committed by Carles Cufi
Browse files

regulator: cp9314: Prints CHIP_REV info after switch case

Moves the CHIP_REV log message after the CHIP_REV switch case. Printing
the log message after allows for the print to be reused for multiple
CHIP_REV cases.

Signed-off-by: default avatarRicardo Rivera-Matos <rriveram@opensource.cirrus.com>
parent f885c8ad
Loading
Loading
Loading
Loading
+2 −1
Changes for drivers/regulator/regulator_cp9314.c: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -520,7 +520,6 @@ static int regulator_cp9314_init(const struct device *dev)

	switch (value) {
	case CP9314_CHIP_REV_B0:
		LOG_INF("Found CP9314 REV:0x%x\n", value);
		ret = regulator_cp9314_b0_init(dev);
		if (ret < 0) {
			return ret;
@@ -531,6 +530,8 @@ static int regulator_cp9314_init(const struct device *dev)
		return -ENOTSUP;
	}

	LOG_INF("Found CP9314 REV:0x%x\n", value);

	ret = regulator_cp9314_otp_init(dev);
	if (ret < 0) {
		return ret;