From ed5ce9cb376cc40f0a4503a6d01ef85b21293424 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 25 Oct 2020 10:14:15 -0400 Subject: [PATCH] linux: Fix spi handling with more than one spi device Reported by @opensource-alt. Signed-off-by: Kevin O'Connor --- src/linux/spidev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/linux/spidev.c b/src/linux/spidev.c index a7733704..1c3574f8 100644 --- a/src/linux/spidev.c +++ b/src/linux/spidev.c @@ -57,6 +57,7 @@ spi_open(uint32_t bus, uint32_t dev) devices[devices_count].bus = bus; devices[devices_count].dev = dev; devices[devices_count].fd = fd; + devices_count++; return fd; }