diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-04-24 21:09:15 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-26 20:20:34 +0400 |
commit | 196269464d4ab950a40c7ac3dac266773aa78b8c (patch) | |
tree | 542b8eef19d9ce4676c71a1dad6538e2de4e01f5 /drivers/net/ieee802154/at86rf230.c | |
parent | ee69559bb838ac44baf675a529b02868c4392188 (diff) | |
download | linux-196269464d4ab950a40c7ac3dac266773aa78b8c.tar.xz |
at86rf230: reset irq line before irq request
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>
Diffstat (limited to 'drivers/net/ieee802154/at86rf230.c')
-rw-r--r-- | drivers/net/ieee802154/at86rf230.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 960444b449d9..994c334fb4f4 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c @@ -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; |