summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/adau1701.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2013-05-23 13:58:00 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-23 08:59:55 -0500
commit47f5b692e04a8d7989ee14591a61be26e340a17b (patch)
treecde2f9a6c1af0bc3f118c13c02d5fcaab888208b /sound/soc/codecs/adau1701.c
parentc7788792a5e7b0d5d7f96d0766b4cb6112d47d75 (diff)
ASoC: adau1701: refactor firmware loading function
Pass a struct i2c_client * to adau1701_load_firmware directly to make the code more readable. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/adau1701.c')
-rw-r--r--sound/soc/codecs/adau1701.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index dafdbe87ede..95e1677665e 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -180,9 +180,9 @@ static unsigned int adau1701_read(struct snd_soc_codec *codec, unsigned int reg)
return value;
}
-static int adau1701_load_firmware(struct snd_soc_codec *codec)
+static int adau1701_load_firmware(struct i2c_client *client)
{
- return process_sigma_firmware(codec->control_data, ADAU1701_FIRMWARE);
+ return process_sigma_firmware(client, ADAU1701_FIRMWARE);
}
static int adau1701_set_capture_pcm_format(struct snd_soc_codec *codec,
@@ -455,10 +455,11 @@ static struct snd_soc_dai_driver adau1701_dai = {
static int adau1701_probe(struct snd_soc_codec *codec)
{
int ret;
+ struct i2c_client *client = to_i2c_client(codec->dev);
- codec->control_data = to_i2c_client(codec->dev);
+ codec->control_data = client;
- ret = adau1701_load_firmware(codec);
+ ret = adau1701_load_firmware(client);
if (ret)
dev_warn(codec->dev, "Failed to load firmware\n");