[rtems commit] bsp/atsam: Remove superfluous irq field

Sebastian Huber sebh at rtems.org
Wed Dec 14 12:10:18 UTC 2016


Module:    rtems
Branch:    master
Commit:    c78928fcac13ac725c83117de2e5eb26bf3c1f6b
Changeset: http://git.rtems.org/rtems/commit/?id=c78928fcac13ac725c83117de2e5eb26bf3c1f6b

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Dec 14 07:44:34 2016 +0100

bsp/atsam: Remove superfluous irq field

---

 c/src/lib/libbsp/arm/atsam/spi/atsam_spi_bus.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/c/src/lib/libbsp/arm/atsam/spi/atsam_spi_bus.c b/c/src/lib/libbsp/arm/atsam/spi/atsam_spi_bus.c
index 4c140cc..1b9ec62 100644
--- a/c/src/lib/libbsp/arm/atsam/spi/atsam_spi_bus.c
+++ b/c/src/lib/libbsp/arm/atsam/spi/atsam_spi_bus.c
@@ -38,7 +38,6 @@
 
 typedef struct {
   spi_bus base;
-  rtems_vector_number irq;
   uint32_t msg_todo;
   const spi_ioc_transfer *msgs;
   rtems_id task_id;
@@ -486,7 +485,7 @@ static void atsam_spi_destroy(spi_bus *base)
   XDMAD_FreeChannel(bus->SpiDma.pXdmad, 0);
   XDMAD_FreeChannel(bus->SpiDma.pXdmad, 1);
 
-  sc = rtems_interrupt_handler_remove(bus->irq, atsam_spi_interrupt, bus);
+  sc = rtems_interrupt_handler_remove(ID_XDMAC, atsam_spi_interrupt, bus);
   assert(sc == RTEMS_SUCCESSFUL);
 
   SPI_Disable(bus->SpiDma.pSpiHw);
@@ -530,7 +529,6 @@ int spi_bus_register_atsam(
   bus->base.speed_hz = bus->base.max_speed_hz;
   bus->base.delay_usecs = 1;
   bus->base.cs = 1;
-  bus->irq = ID_XDMAC;
   bus->SpiDma.spiId = spi_peripheral_id;
   bus->SpiDma.pSpiHw = spi_regs;
 
@@ -541,11 +539,11 @@ int spi_bus_register_atsam(
   atsam_set_dmac(bus);
 
   sc = rtems_interrupt_handler_install(
-      bus->irq,
-      "SPI",
-      RTEMS_INTERRUPT_UNIQUE,
-      atsam_spi_interrupt,
-      bus
+    ID_XDMAC,
+    "SPI",
+    RTEMS_INTERRUPT_UNIQUE,
+    atsam_spi_interrupt,
+    bus
   );
   if (sc != RTEMS_SUCCESSFUL) {
     (*bus->base.destroy)(&bus->base);



More information about the vc mailing list