aboutsummaryrefslogtreecommitdiff
path: root/sensors.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sensors.cpp')
-rw-r--r--sensors.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/sensors.cpp b/sensors.cpp
index d2166be..615c784 100644
--- a/sensors.cpp
+++ b/sensors.cpp
@@ -124,16 +124,14 @@ bool SensorBase::init(int id,std::string _sensor_basename)
enable_buffer();
devfd=open(devbufpath.c_str(),O_RDONLY);
if(!~devfd)
- {
- LOG('E',"failed to open the iio buffer device: %s",devbufpath.c_str());
- return 1;
- }
+ return LOG('E',"failed to open the iio buffer device: %s",devbufpath.c_str()),1;
return 0;
}
void SensorBase::deinit()
{
if(~devfd)close(devfd);
devfd=-1;
+ //...also disable iio buffers?
}
void SensorBase::reset()
{