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

Commit 0d35d080 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown
Browse files

ASoC: twl6040: Rename twl6040_is_path_unmuted -> twl6040_can_write_to_chip



Matches more precisely of the functionality.

Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 17104049
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -219,7 +219,7 @@ static int twl6040_read_reg_volatile(struct snd_soc_codec *codec,
	return value;
}

static bool twl6040_is_path_unmuted(struct snd_soc_codec *codec,
static bool twl6040_can_write_to_chip(struct snd_soc_codec *codec,
				  unsigned int reg)
{
	struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
@@ -250,7 +250,7 @@ static int twl6040_write(struct snd_soc_codec *codec,
		return -EIO;

	twl6040_write_reg_cache(codec, reg, value);
	if (twl6040_is_path_unmuted(codec, reg))
	if (twl6040_can_write_to_chip(codec, reg))
		return twl6040_reg_write(twl6040, reg, value);
	else
		return 0;