summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs42xx8.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-04-09 17:50:02 +0200
committerTakashi Iwai <tiwai@suse.de>2014-04-09 17:50:02 +0200
commit50487c3a4a96d91e25d43d63262773f14961d9de (patch)
tree9649437556ec56e5ba27e943313f093318b17b81 /sound/soc/codecs/cs42xx8.c
parentALSA: hda - Make full_reset boolean (diff)
parentMerge remote-tracking branches 'asoc/fix/rt5640', 'asoc/fix/samsung', 'asoc/f... (diff)
downloadlinux-50487c3a4a96d91e25d43d63262773f14961d9de.tar.xz
linux-50487c3a4a96d91e25d43d63262773f14961d9de.zip
Merge tag 'asoc-v3.15-5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.15 A smattering of device specific fixes, nothing stands out here except for the multiplatform fixes for Samsung and the device IDs being added by Stephen Warren - there's no real code changes from those and they give better robustness to the enumeration with DT.
Diffstat (limited to 'sound/soc/codecs/cs42xx8.c')
-rw-r--r--sound/soc/codecs/cs42xx8.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/soc/codecs/cs42xx8.c b/sound/soc/codecs/cs42xx8.c
index 082299a4e2fa..85020322eee7 100644
--- a/sound/soc/codecs/cs42xx8.c
+++ b/sound/soc/codecs/cs42xx8.c
@@ -495,17 +495,16 @@ int cs42xx8_probe(struct device *dev, struct regmap *regmap)
regcache_cache_bypass(cs42xx8->regmap, true);
/* Validate the chip ID */
- regmap_read(cs42xx8->regmap, CS42XX8_CHIPID, &val);
- if (val < 0) {
- dev_err(dev, "failed to get device ID: %x", val);
- ret = -EINVAL;
+ ret = regmap_read(cs42xx8->regmap, CS42XX8_CHIPID, &val);
+ if (ret < 0) {
+ dev_err(dev, "failed to get device ID, ret = %d", ret);
goto err_enable;
}
/* The top four bits of the chip ID should be 0000 */
- if ((val & CS42XX8_CHIPID_CHIP_ID_MASK) != 0x00) {
+ if (((val & CS42XX8_CHIPID_CHIP_ID_MASK) >> 4) != 0x00) {
dev_err(dev, "unmatched chip ID: %d\n",
- val & CS42XX8_CHIPID_CHIP_ID_MASK);
+ (val & CS42XX8_CHIPID_CHIP_ID_MASK) >> 4);
ret = -EINVAL;
goto err_enable;
}