Skip to content

Commit

Permalink
at86rf230: reset irq line before irq request
Browse files Browse the repository at this point in the history
This patch resets the irq line before we are requesting the irq. This
avoids pending interrupts before requesting.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexander Aring authored and David S. Miller committed Apr 26, 2014
1 parent ee69559 commit 1962694
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ieee802154/at86rf230.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,13 +1172,13 @@ static int at86rf230_probe(struct spi_device *spi)
if (rc)
goto err_hw_init;

rc = devm_request_irq(&spi->dev, spi->irq, irq_handler, IRQF_SHARED,
dev_name(&spi->dev), lp);
/* Read irq status register to reset irq line */
rc = at86rf230_read_subreg(lp, RG_IRQ_STATUS, 0xff, 0, &status);
if (rc)
goto err_hw_init;

/* Read irq status register to reset irq line */
rc = at86rf230_read_subreg(lp, RG_IRQ_STATUS, 0xff, 0, &status);
rc = devm_request_irq(&spi->dev, spi->irq, irq_handler, IRQF_SHARED,
dev_name(&spi->dev), lp);
if (rc)
goto err_hw_init;

Expand Down

0 comments on commit 1962694

Please sign in to comment.