]> Pileus Git - ~andy/linux/commitdiff
ASoC: fsl_ssi: let check zero instead of check NO_IRQ
authorChen Gang <gang.chen@asianux.com>
Mon, 23 Sep 2013 03:36:21 +0000 (11:36 +0800)
committerMark Brown <broonie@linaro.org>
Thu, 26 Sep 2013 10:28:52 +0000 (11:28 +0100)
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
check zero instead of NO_IRQ, or will cause compiling issue or run
time bug in some architectures.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/fsl/fsl_ssi.c

index cdbb641ef51820a175954ac03ac25259ac414f12..35e277379b86ce80d56737e3e0c05a5b3772fb2c 100644 (file)
@@ -929,7 +929,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;
        }