BACKPORT: ASoC: max98088: Fix logging of hardware revision.
authorDylan Reid <dgreid@chromium.org>
Wed, 17 Apr 2013 03:02:34 +0000 (20:02 -0700)
committerChromeBot <chrome-bot@google.com>
Thu, 18 Apr 2013 06:31:08 +0000 (23:31 -0700)
The hardware revision of the codec is based at 0x40.  Subtract that
before convering to ASCII.  The same as it is done for 98095.

BUG=chrome-os-partner:18551
TEST=check dmesg and see revision = 'A'

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 98682063549bedd6e2d2b6b7222f150c6fbce68c)

Change-Id: I942d832bceb9c42370a0dd8364040b157d7ffd77
Reviewed-on: https://gerrit.chromium.org/gerrit/48462
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
sound/soc/codecs/max98088.c

index 2f37918..43c1028 100644 (file)
@@ -2027,7 +2027,7 @@ static int max98088_probe(struct snd_soc_codec *codec)
                        ret);
                goto err_access;
        }
-       dev_info(codec->dev, "revision %c\n", ret + 'A');
+       dev_info(codec->dev, "revision %c\n", ret - 0x40 + 'A');
 
        snd_soc_write(codec, M98088_REG_51_PWR_SYS, M98088_PWRSV);