public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux•com>
To: lgirdwood@gmail•com, Mark Brown <broonie@kernel•org>,
	perex@perex•cz, Takashi Iwai <tiwai@suse•de>
Cc: alsa-devel@alsa-project•org,
	"linuxppc-dev@lists•ozlabs.org" <linuxppc-dev@lists•ozlabs.org>
Subject: [PATCH] sound/soc/fsl/fsl_ssi.c: let checking none-zero instead of checking NO_IRQ
Date: Mon, 23 Sep 2013 11:24:44 +0800	[thread overview]
Message-ID: <523FB47C.8010800@asianux.com> (raw)

NO_IRQ may be defined as '(unsigned int) -1' in some architectures
(arm, sh ...), and either may not be defined in some architectures
which can enable SND_SOC_FSL_SSI (e.g. allmodconfig for arc).

When irq_of_parse_and_map() fails, it will always return 0, so need let
checking none-zero instead of checking NO_IRQ, or will cause compiling
issue or run time bug in some architectures.


Signed-off-by: Chen Gang <gang.chen@asianux•com>
---
 sound/soc/fsl/fsl_ssi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 6ac8730..6c17d3e 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -936,7 +936,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
 	ssi_private->ssi_phys = res.start;
 
 	ssi_private->irq = irq_of_parse_and_map(np, 0);
-	if (ssi_private->irq == NO_IRQ) {
+	if (!ssi_private->irq) {
 		dev_err(&pdev->dev, "no irq for node %s\n", np->full_name);
 		return -ENXIO;
 	}
-- 
1.7.7.6

             reply	other threads:[~2013-09-23  3:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-23  3:24 Chen Gang [this message]
2013-09-23  3:35 ` [PATCH] sound/soc/fsl/fsl_ssi.c: let checking none-zero instead of checking NO_IRQ Chen Gang
2013-09-23  3:36   ` [PATCH v2] sound/soc/fsl/fsl_ssi.c: let check zero instead of check NO_IRQ Chen Gang
2013-09-26 10:29     ` Mark Brown
2013-09-26 10:40       ` Chen Gang

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=523FB47C.8010800@asianux.com \
    --to=gang.chen@asianux$(echo .)com \
    --cc=alsa-devel@alsa-project$(echo .)org \
    --cc=broonie@kernel$(echo .)org \
    --cc=lgirdwood@gmail$(echo .)com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=perex@perex$(echo .)cz \
    --cc=tiwai@suse$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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