summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/gba/irq/irq.c
diff options
context:
space:
mode:
authorTill Straumann <strauman@slac.stanford.edu>2007-11-06 21:38:27 +0000
committerTill Straumann <strauman@slac.stanford.edu>2007-11-06 21:38:27 +0000
commit63fa36ea6051f14c3d19f2a0d5c7028adc2e6909 (patch)
tree175522b91b1f75e5c3620c141f064f31a67faf46 /c/src/lib/libbsp/arm/gba/irq/irq.c
parent081583c6610ded0d1fc13aaffcb123daf260bf1e (diff)
downloadrtems-63fa36ea6051f14c3d19f2a0d5c7028adc2e6909.tar.bz2
2007-11-06 Till Straumann <strauman@slac.stanford.edu>
* gba/irq/irq.c: test for non-NULL-ness before calling 'on'/'off' methods so that users don't have to provide no-ops if they don't want this feature.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/arm/gba/irq/irq.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/arm/gba/irq/irq.c b/c/src/lib/libbsp/arm/gba/irq/irq.c
index 16bc667135..abebc130e1 100644
--- a/c/src/lib/libbsp/arm/gba/irq/irq.c
+++ b/c/src/lib/libbsp/arm/gba/irq/irq.c
@@ -87,7 +87,8 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
/*
* Enable interrupt on device
*/
- irq->on(irq);
+ if (irq->on)
+ irq->on(irq);
rtems_interrupt_enable(level);
@@ -125,7 +126,8 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
/*
* Disable interrupt on device
*/
- irq->off(irq);
+ if (irq->off)
+ irq->off(irq);
/*
* restore the default irq value