at86rf230: fix enable_irq handling on async spi
authorAlexander Aring <alex.aring@gmail.com>
Tue, 7 Oct 2014 08:38:32 +0000 (10:38 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 25 Oct 2014 05:56:23 +0000 (07:56 +0200)
commit97fed795e70d97fb89ebd8c3efc30b33aa4ac1fa
tree7a8549a6f79f4ae5870445b2edba86982590a218
parent35e92a8e1b9058a5f7da271a7a60264a4888f4b9
at86rf230: fix enable_irq handling on async spi

Sometimes the async state function is call in an context where the spi
irq is diabled. This patch fix the handling to enable the irq when
spi_async failed in the async state change calling chain. We do this by
a context parameter irq_enable and evaluate this parameter when
spi_async failed instead of returning spi_async errno.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/net/ieee802154/at86rf230.c