summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/twl4030.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2014-01-03 15:27:56 +0200
committerMark Brown <broonie@linaro.org>2014-01-08 12:48:53 +0000
commitb703b504856b9a9df6bace81e251d185dd72e958 (patch)
tree4772bd2ea2c84b4763f69cf9be4caf8cde5b6b0a /sound/soc/codecs/twl4030.c
parenta450aa6f507542d87ad237cb402b8b6e56329924 (diff)
downloadop-kernel-dev-b703b504856b9a9df6bace81e251d185dd72e958.zip
op-kernel-dev-b703b504856b9a9df6bace81e251d185dd72e958.tar.gz
ASoC: twl4030: Pass the twl4030_priv directly to twl4030_can_write_to_chip()
To avoid another lookup for the twl4030_priv in there. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/twl4030.c')
-rw-r--r--sound/soc/codecs/twl4030.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index c3c15f8..00665ad 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -111,10 +111,9 @@ static unsigned int twl4030_read(struct snd_soc_codec *codec, unsigned int reg)
return value;
}
-static bool twl4030_can_write_to_chip(struct snd_soc_codec *codec,
+static bool twl4030_can_write_to_chip(struct twl4030_priv *twl4030,
unsigned int reg)
{
- struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec);
bool write_to_reg = false;
/* Decide if the given register can be written */
@@ -171,7 +170,7 @@ static int twl4030_write(struct snd_soc_codec *codec, unsigned int reg,
break;
}
- if (twl4030_can_write_to_chip(codec, reg))
+ if (twl4030_can_write_to_chip(twl4030, reg))
return twl_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, value, reg);
return 0;
OpenPOWER on IntegriCloud