summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/alc5623.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2014-04-15 14:37:05 +0200
committerMark Brown <broonie@linaro.org>2014-04-15 14:21:21 +0100
commit8aaa414fadaec2b682168a5c937a3950a77956bf (patch)
tree101c1f2d607fb5de64831f6e918707e015f0a31f /sound/soc/codecs/alc5623.c
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
downloadop-kernel-dev-8aaa414fadaec2b682168a5c937a3950a77956bf.zip
op-kernel-dev-8aaa414fadaec2b682168a5c937a3950a77956bf.tar.gz
ASoC: alc5623: Fix regmap endianness
Commit 0cd257bf9b9b0cbb4fa1a5c988a232506997867c, "ASoC: alc5623: Convert to direct regmap API usage" broke probing of the codec, because of wrong endinness of the ID and codec version read from the device. Fix this by removing the existing flipping of the endiannes, and extracting the codec type byte from the word from the regmap. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/alc5623.c')
-rw-r--r--sound/soc/codecs/alc5623.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c
index f500905..2acf82f 100644
--- a/sound/soc/codecs/alc5623.c
+++ b/sound/soc/codecs/alc5623.c
@@ -1018,13 +1018,13 @@ static int alc5623_i2c_probe(struct i2c_client *client,
dev_err(&client->dev, "failed to read vendor ID1: %d\n", ret);
return ret;
}
- vid1 = ((vid1 & 0xff) << 8) | (vid1 >> 8);
ret = regmap_read(alc5623->regmap, ALC5623_VENDOR_ID2, &vid2);
if (ret < 0) {
dev_err(&client->dev, "failed to read vendor ID2: %d\n", ret);
return ret;
}
+ vid2 >>= 8;
if ((vid1 != 0x10ec) || (vid2 != id->driver_data)) {
dev_err(&client->dev, "unknown or wrong codec\n");
OpenPOWER on IntegriCloud