summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Hutt <thutt@chromium.org>2011-06-20 18:54:32 (GMT)
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-21 23:27:39 (GMT)
commitbab3b59d531bb4dd04d2996dd553ab6e38ec8972 (patch)
tree9345a8d534da15b87688f03196de0b54cb3b1141
parentc20974090e9093b8b69b37543cba381336c41ab7 (diff)
downloadlinux-bab3b59d531bb4dd04d2996dd553ab6e38ec8972.tar.xz
ASoC: codecs: Max98095: Fix logging of hardware revision.
The base hardware revision of the Maxim 98095 part is 0x40; the code which outputs the revision of the hardware has been updated to properly use uppercase alphabetic values for the revision numbers. Also, the use of a constant for the length 'max98095_dai' has been replaced with ARRAY_SIZE(). Signed-off-by: Taylor Hutt <thutt@chromium.org> Acked-by: Peter Hsiang <peter.hsiang@maxim-ic.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/codecs/max98095.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index 872a5fa..668434d 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -2259,11 +2259,11 @@ static int max98095_probe(struct snd_soc_codec *codec)
ret = snd_soc_read(codec, M98095_0FF_REV_ID);
if (ret < 0) {
- dev_err(codec->dev, "Failed to read device revision: %d\n",
+ dev_err(codec->dev, "Failure reading hardware revision: %d\n",
ret);
goto err_access;
}
- dev_info(codec->dev, "revision %c\n", ret + 'A');
+ dev_info(codec->dev, "Hardware revision: %c\n", ret - 0x40 + 'A');
snd_soc_write(codec, M98095_097_PWR_SYS, M98095_PWRSV);
@@ -2340,8 +2340,8 @@ static int max98095_i2c_probe(struct i2c_client *i2c,
max98095->control_data = i2c;
max98095->pdata = i2c->dev.platform_data;
- ret = snd_soc_register_codec(&i2c->dev,
- &soc_codec_dev_max98095, &max98095_dai[0], 3);
+ ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_max98095,
+ max98095_dai, ARRAY_SIZE(max98095_dai));
if (ret < 0)
kfree(max98095);
return ret;