Skip to content

Commit 2cdba3c

Browse files
kimphillherbertx
authored andcommitted
crypto: talitos - remove NO_IRQ references
As prescribed by Linus: https://lkml.org/lkml/2011/12/2/290 Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 0b2730d commit 2cdba3c

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎drivers/crypto/talitos.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static int reset_device(struct device *dev)
234234
&& --timeout)
235235
cpu_relax();
236236

237-
if (priv->irq[1] != NO_IRQ) {
237+
if (priv->irq[1]) {
238238
mcr = TALITOS_MCR_RCA1 | TALITOS_MCR_RCA3;
239239
setbits32(priv->reg + TALITOS_MCR, mcr);
240240
}
@@ -2581,13 +2581,13 @@ static int talitos_remove(struct platform_device *ofdev)
25812581
kfree(priv->chan);
25822582

25832583
for (i = 0; i < 2; i++)
2584-
if (priv->irq[i] != NO_IRQ) {
2584+
if (priv->irq[i]) {
25852585
free_irq(priv->irq[i], dev);
25862586
irq_dispose_mapping(priv->irq[i]);
25872587
}
25882588

25892589
tasklet_kill(&priv->done_task[0]);
2590-
if (priv->irq[1] != NO_IRQ)
2590+
if (priv->irq[1])
25912591
tasklet_kill(&priv->done_task[1]);
25922592

25932593
iounmap(priv->reg);
@@ -2663,15 +2663,15 @@ static int talitos_probe_irq(struct platform_device *ofdev)
26632663
int err;
26642664

26652665
priv->irq[0] = irq_of_parse_and_map(np, 0);
2666-
if (priv->irq[0] == NO_IRQ) {
2666+
if (!priv->irq[0]) {
26672667
dev_err(dev, "failed to map irq\n");
26682668
return -EINVAL;
26692669
}
26702670

26712671
priv->irq[1] = irq_of_parse_and_map(np, 1);
26722672

26732673
/* get the primary irq line */
2674-
if (priv->irq[1] == NO_IRQ) {
2674+
if (!priv->irq[1]) {
26752675
err = request_irq(priv->irq[0], talitos_interrupt_4ch, 0,
26762676
dev_driver_string(dev), dev);
26772677
goto primary_out;
@@ -2688,7 +2688,7 @@ static int talitos_probe_irq(struct platform_device *ofdev)
26882688
if (err) {
26892689
dev_err(dev, "failed to request secondary irq\n");
26902690
irq_dispose_mapping(priv->irq[1]);
2691-
priv->irq[1] = NO_IRQ;
2691+
priv->irq[1] = 0;
26922692
}
26932693

26942694
return err;
@@ -2697,7 +2697,7 @@ static int talitos_probe_irq(struct platform_device *ofdev)
26972697
if (err) {
26982698
dev_err(dev, "failed to request primary irq\n");
26992699
irq_dispose_mapping(priv->irq[0]);
2700-
priv->irq[0] = NO_IRQ;
2700+
priv->irq[0] = 0;
27012701
}
27022702

27032703
return err;
@@ -2723,7 +2723,7 @@ static int talitos_probe(struct platform_device *ofdev)
27232723
if (err)
27242724
goto err_out;
27252725

2726-
if (priv->irq[1] == NO_IRQ) {
2726+
if (!priv->irq[1]) {
27272727
tasklet_init(&priv->done_task[0], talitos_done_4ch,
27282728
(unsigned long)dev);
27292729
} else {
@@ -2784,7 +2784,7 @@ static int talitos_probe(struct platform_device *ofdev)
27842784

27852785
for (i = 0; i < priv->num_channels; i++) {
27862786
priv->chan[i].reg = priv->reg + TALITOS_CH_STRIDE * (i + 1);
2787-
if ((priv->irq[1] == NO_IRQ) || !(i & 1))
2787+
if (!priv->irq[1] || !(i & 1))
27882788
priv->chan[i].reg += TALITOS_CH_BASE_OFFSET;
27892789
}
27902790

0 commit comments

Comments
 (0)