Skip to content

Commit e480316

Browse files
chleroygregkh
authored andcommitted
uio: uio_fsl_elbc_gpcm: Replace NO_IRQ by 0
NO_IRQ is used to check the return of irq_of_parse_and_map(). On some architecture NO_IRQ is 0, on other architectures it is -1. irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ. So use 0 instead of using NO_IRQ. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Link: https://lore.kernel.org/r/68ccdf51811ab26bdb452babf17ae860fa4900c2.1665034535.git.christophe.leroy@csgroup.eu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 982a844 commit e480316

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/uio/uio_fsl_elbc_gpcm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,13 +390,13 @@ static int uio_fsl_elbc_gpcm_probe(struct platform_device *pdev)
390390
info->priv = priv;
391391
info->name = uio_name;
392392
info->version = "0.0.1";
393-
if (irq != NO_IRQ) {
393+
if (irq) {
394394
if (priv->irq_handler) {
395395
info->irq = irq;
396396
info->irq_flags = IRQF_SHARED;
397397
info->handler = priv->irq_handler;
398398
} else {
399-
irq = NO_IRQ;
399+
irq = 0;
400400
dev_warn(priv->dev, "ignoring irq, no handler\n");
401401
}
402402
}
@@ -417,7 +417,7 @@ static int uio_fsl_elbc_gpcm_probe(struct platform_device *pdev)
417417
dev_info(priv->dev,
418418
"eLBC/GPCM device (%s) at 0x%llx, bank %d, irq=%d\n",
419419
priv->name, (unsigned long long)res.start, priv->bank,
420-
irq != NO_IRQ ? irq : -1);
420+
irq ? : -1);
421421

422422
return 0;
423423
out_err2:

0 commit comments

Comments
 (0)