[PATCH 11/32] leon, grcan: unregister interrupt handler at close
Daniel Hellstrom
daniel at gaisler.com
Thu May 11 14:25:56 UTC 2017
From: Martin Aberg <maberg at gaisler.com>
---
c/src/lib/libbsp/sparc/shared/can/grcan.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/c/src/lib/libbsp/sparc/shared/can/grcan.c b/c/src/lib/libbsp/sparc/shared/can/grcan.c
index 003cecf..c7aadae 100644
--- a/c/src/lib/libbsp/sparc/shared/can/grcan.c
+++ b/c/src/lib/libbsp/sparc/shared/can/grcan.c
@@ -1275,8 +1275,12 @@ int grcan_close(void *d)
FUNCDBG();
- if ( pDev->started )
+ if ( pDev->started ) {
+ /* Disable interrupts */
+ drvmgr_interrupt_unregister(pDev->dev, 0, grcan_interrupt, pDev);
grcan_hw_stop(pDev);
+ pDev->started = 0;
+ }
grcan_hw_reset(pDev->regs);
--
2.7.4
More information about the devel
mailing list