From 22961395167388eba7a997dbc3766b529501b208 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 7 Dec 2015 19:06:42 -0200 Subject: [PATCH] AP_HAL_Linux: remove unused constant --- libraries/AP_HAL_Linux/SPIDriver.cpp | 2 +- libraries/AP_HAL_Linux/SPIDriver.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/libraries/AP_HAL_Linux/SPIDriver.cpp b/libraries/AP_HAL_Linux/SPIDriver.cpp index 059ecf9b29..e1441dfe3f 100644 --- a/libraries/AP_HAL_Linux/SPIDriver.cpp +++ b/libraries/AP_HAL_Linux/SPIDriver.cpp @@ -161,7 +161,7 @@ void SPIDeviceManager::init() } char path[255]; snprintf(path, sizeof(path), "/dev/spidev%u.%u", - _device[i]._bus + LINUX_SPIDEV_BUS_OFFSET, _device[i]._subdev); + _device[i]._bus, _device[i]._subdev); _device[i]._fd = open(path, O_RDWR); if (_device[i]._fd == -1) { printf("Unable to open %s - %s\n", path, strerror(errno)); diff --git a/libraries/AP_HAL_Linux/SPIDriver.h b/libraries/AP_HAL_Linux/SPIDriver.h index 3cde18cfde..27109c347f 100644 --- a/libraries/AP_HAL_Linux/SPIDriver.h +++ b/libraries/AP_HAL_Linux/SPIDriver.h @@ -5,11 +5,6 @@ #include "AP_HAL_Linux.h" #include "Semaphores.h" -// Most platforms won't need to declare the spidev bus offset -#ifndef LINUX_SPIDEV_BUS_OFFSET -#define LINUX_SPIDEV_BUS_OFFSET 0 -#endif - #define LINUX_SPI_MAX_BUSES 3 // Fake CS pin to indicate in-kernel handling