alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Cc: "Mark Brown" <broonie@opensource.wolfsonmicro.com>,
	"Ian Lartey" <ian@opensource.wolfsonmicro.com>,
	"Dimitris Papastamos" <dp@opensource.wolfsonmicro.com>,
	"Liam Girdwood" <lrg@ti.com>, "Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.de>,
	"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
Subject: [PATCH] ASoC: WM8958: correctly show firmware magic on mismatch
Date: Sun, 11 Dec 2011 19:15:49 +0100	[thread overview]
Message-ID: <1323627349-2488-1-git-send-email-j.neuschaefer@gmx.net> (raw)

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
This patch is untested.

 sound/soc/codecs/wm8958-dsp2.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c
index 0293763..5a14d5c 100644
--- a/sound/soc/codecs/wm8958-dsp2.c
+++ b/sound/soc/codecs/wm8958-dsp2.c
@@ -60,6 +60,8 @@ static int wm8958_dsp2_fw(struct snd_soc_codec *codec, const char *name,
 	}
 
 	if (memcmp(fw->data, "WMFW", 4) != 0) {
+		memcpy(&data32, fw->data, sizeof(data32));
+		data32 = be32_to_cpu(data32);
 		dev_err(codec->dev, "%s: firmware has bad file magic %08x\n",
 			name, data32);
 		goto err;
-- 
1.7.7.3

             reply	other threads:[~2011-12-11 18:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-11 18:15 Jonathan Neuschäfer [this message]
2011-12-12  4:58 ` [PATCH] ASoC: WM8958: correctly show firmware magic on mismatch Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1323627349-2488-1-git-send-email-j.neuschaefer@gmx.net \
    --to=j.neuschaefer@gmx.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dp@opensource.wolfsonmicro.com \
    --cc=ian@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).