Browse Source

AP_HAL_Linux: Remove hole from SPIBus

Also handle a few coding style bikesheds.
master
Lucas De Marchi 7 years ago committed by Lucas De Marchi
parent
commit
cf4fb09881
  1. 7
      libraries/AP_HAL_Linux/SPIDevice.cpp

7
libraries/AP_HAL_Linux/SPIDevice.cpp

@ -171,8 +171,8 @@ public: @@ -171,8 +171,8 @@ public:
int fd = -1;
uint16_t bus;
uint16_t subdev;
uint8_t ref;
int16_t last_mode = -1;
uint8_t ref;
};
SPIBus::~SPIBus()
@ -466,7 +466,8 @@ SPIDeviceManager::get_device(const char *name) @@ -466,7 +466,8 @@ SPIDeviceManager::get_device(const char *name)
return dev;
}
uint8_t SPIDeviceManager::get_count() {
uint8_t SPIDeviceManager::get_count()
{
return _n_device_desc;
}
@ -483,7 +484,9 @@ SPIDeviceManager::_create_device(SPIBus &b, SPIDesc &desc) const @@ -483,7 +484,9 @@ SPIDeviceManager::_create_device(SPIBus &b, SPIDesc &desc) const
if (!dev) {
return nullptr;
}
b.ref++;
return dev;
}

Loading…
Cancel
Save