HAL_Chibios: don't unregister shared DMA

the shared DMA handle is a property of the bus, not the device, so
should not be unregistered when the device is removed
This commit is contained in:
Andrew Tridgell 2018-01-08 15:35:08 +11:00
parent 9812fc9574
commit 755eca31c2
3 changed files with 0 additions and 3 deletions

View File

@ -59,7 +59,6 @@ I2CDevice::I2CDevice(uint8_t bus, uint8_t address) :
I2CDevice::~I2CDevice()
{
businfo[_busnum].dma_handle->unregister();
printf("I2C device bus %u address 0x%02x closed\n",
(unsigned)_busnum, (unsigned)_address);
free(pname);

View File

@ -164,7 +164,6 @@ SPIDevice::~SPIDevice()
{
//printf("SPI device %s on %u:%u closed\n", device_desc.name,
// (unsigned)bus.bus, (unsigned)device_desc.device);
bus.dma_handle->unregister();
free(pname);
}

View File

@ -53,7 +53,6 @@ void Shared_DMA::unregister()
locks[stream_id2].deallocate();
locks[stream_id2].obj = nullptr;
}
}
// lock the DMA channels