summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-12 13:57:25 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-12 13:57:25 +0100
commit6d21c5d64bc0a86affab5d6addbc01652e332b55 (patch)
tree3351c995e116ef0be4a55349a6e0f85f4fbc5e8a /sound/soc
parent0dd9e6bd6f878070ac64b331c8d287460a697374 (diff)
parent1f5353e765fe2a1168477bfe55e4dd7cdd96b477 (diff)
Merge remote-tracking branch 'asoc/topic/wm-hubs' into asoc-next
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm_hubs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c
index 867ae97ddce..f5d81b94875 100644
--- a/sound/soc/codecs/wm_hubs.c
+++ b/sound/soc/codecs/wm_hubs.c
@@ -199,11 +199,12 @@ static void wm_hubs_dcs_cache_set(struct snd_soc_codec *codec, u16 dcs_cfg)
list_add_tail(&cache->list, &hubs->dcs_cache);
}
-static void wm_hubs_read_dc_servo(struct snd_soc_codec *codec,
+static int wm_hubs_read_dc_servo(struct snd_soc_codec *codec,
u16 *reg_l, u16 *reg_r)
{
struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec);
u16 dcs_reg, reg;
+ int ret = 0;
switch (hubs->dcs_readback_mode) {
case 2:
@@ -236,8 +237,9 @@ static void wm_hubs_read_dc_servo(struct snd_soc_codec *codec,
break;
default:
WARN(1, "Unknown DCS readback method\n");
- return;
+ ret = -1;
}
+ return ret;
}
/*
@@ -286,7 +288,8 @@ static void enable_dc_servo(struct snd_soc_codec *codec)
WM8993_DCS_TRIG_STARTUP_1);
}
- wm_hubs_read_dc_servo(codec, &reg_l, &reg_r);
+ if (wm_hubs_read_dc_servo(codec, &reg_l, &reg_r) < 0)
+ return;
dev_dbg(codec->dev, "DCS input: %x %x\n", reg_l, reg_r);