Unverified Commit f7d01359 authored by Lucas Tanure's avatar Lucas Tanure Committed by Mark Brown
Browse files

regmap: Fix order of regmap write log



_regmap_write can trigger a _regmap_select_page, which will call
another _regmap_write that will be executed first, but the log shows
the inverse order

Also, keep consistency with _regmap_read which only logs in case of
success

Signed-off-by: default avatarLucas Tanure <tanureal@opensource.cirrus.com>
Reviewed-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20201112150217.459844-1-tanureal@opensource.cirrus.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6e1e90ec
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -1924,12 +1924,15 @@ int _regmap_write(struct regmap *map, unsigned int reg,
		}
	}

	ret = map->reg_write(context, reg, val);
	if (ret == 0) {
		if (regmap_should_log(map))
			dev_info(map->dev, "%x <= %x\n", reg, val);

		trace_regmap_reg_write(map, reg, val);
	}

	return map->reg_write(context, reg, val);
	return ret;
}

/**