summaryrefslogtreecommitdiff
path: root/60xx/libsensors_iio
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2015-02-24 04:53:51 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-24 04:53:51 +0000
commit651b0bb86991950e5066619ee7f536e4b6299fc9 (patch)
treeeadd8312dfd4eaeabc1a5403a5bd25c87c27a7f6 /60xx/libsensors_iio
parent5bfd23080232f9b55a6d0366fd94c34f4f5dff93 (diff)
parent5a1695ae86cd6901d4bd825a85923d8e6a8056dd (diff)
downloadinvensense-651b0bb86991950e5066619ee7f536e4b6299fc9.tar.gz
am 5a1695ae: am 37db663c: Merge "Remove dead code"
* commit '5a1695ae86cd6901d4bd825a85923d8e6a8056dd': Remove dead code
Diffstat (limited to '60xx/libsensors_iio')
-rw-r--r--60xx/libsensors_iio/CompassSensor.IIO.9150.cpp1
-rw-r--r--60xx/libsensors_iio/MPLSensor.cpp24
2 files changed, 0 insertions, 25 deletions
diff --git a/60xx/libsensors_iio/CompassSensor.IIO.9150.cpp b/60xx/libsensors_iio/CompassSensor.IIO.9150.cpp
index 14b92e7..be8c912 100644
--- a/60xx/libsensors_iio/CompassSensor.IIO.9150.cpp
+++ b/60xx/libsensors_iio/CompassSensor.IIO.9150.cpp
@@ -288,7 +288,6 @@ void CompassSensor::fillList(struct sensor_t *list)
list->maxRange = COMPASS_MPU9150_RANGE;
/* since target platform would use AK8963 instead of AK8975,
need to adopt AK8963's resolution here */
- // list->resolution = COMPASS_MPU9150_RESOLUTION;
list->resolution = COMPASS_AKM8963_RESOLUTION;
list->power = COMPASS_MPU9150_POWER;
list->minDelay = COMPASS_MPU9150_MINDELAY;
diff --git a/60xx/libsensors_iio/MPLSensor.cpp b/60xx/libsensors_iio/MPLSensor.cpp
index d070231..0aa6556 100644
--- a/60xx/libsensors_iio/MPLSensor.cpp
+++ b/60xx/libsensors_iio/MPLSensor.cpp
@@ -588,8 +588,6 @@ void MPLSensor::loadDMP()
LOGV_IF(PROCESS_VERBOSE, "HAL:DMP loaded");
}
fclose(fptr);
-
- // onDMP(1); //Can't enable here. See note onDMP()
}
void MPLSensor::inv_get_sensors_orientation()
@@ -742,7 +740,6 @@ int MPLSensor::setAccelInitialState()
mPendingEvents[Accelerometer].data[1] = value * CONVERT_A_Y;
value = absinfo_z.value;
mPendingEvents[Accelerometer].data[2] = value * CONVERT_A_Z;
- //mHasPendingEvent = true;
}
return 0;
}
@@ -1357,9 +1354,6 @@ int MPLSensor::enable(int32_t handle, int en)
LOGV_IF(PROCESS_VERBOSE,
"HAL:%s sensor state change what=%d", sname.string(), what);
- // pthread_mutex_lock(&mMplMutex);
- // pthread_mutex_lock(&mHALMutex);
-
if ((uint32_t(newState) << what) != (mEnabled & (1 << what))) {
short flags = newState;
uint32_t lastEnabled = mEnabled, changed = 0;
@@ -1407,9 +1401,6 @@ int MPLSensor::enable(int32_t handle, int en)
enableSensors(sen_mask, flags, changed);
}
- // pthread_mutex_unlock(&mMplMutex);
- // pthread_mutex_unlock(&mHALMutex);
-
#ifdef INV_PLAYBACK_DBG
/* apparently the logging needs to be go through this sequence
to properly flush the log file */
@@ -1543,9 +1534,7 @@ int MPLSensor::setDelay(int32_t handle, int64_t ns)
break;
}
- // pthread_mutex_lock(&mHALMutex);
int res = update_delay();
- // pthread_mutex_unlock(&mHALMutex);
return res;
}
@@ -1868,12 +1857,8 @@ int MPLSensor::readEvents(sensors_event_t* /*data*/, int /*count*/) {
}
}
- // pthread_mutex_lock(&mMplMutex);
- // pthread_mutex_lock(&mHALMutex);
-
ssize_t rsize = read(iio_fd, rdata, nbyte);
if (sensors == 0) {
- // read(iio_fd, rdata, nbyte);
rsize = read(iio_fd, rdata, sizeof(mIIOBuffer));
}
@@ -2015,9 +2000,6 @@ int MPLSensor::readEvents(sensors_event_t* /*data*/, int /*count*/) {
mCachedQuaternionData[2], mCachedQuaternionData[3], mSensorTimestamp);
}
- // pthread_mutex_unlock(&mMplMutex);
- // pthread_mutex_unlock(&mHALMutex);
-
return numEventReceived;
}
@@ -2032,9 +2014,6 @@ int MPLSensor::readCompassEvents(sensors_event_t* /*data*/, int count)
int numEventReceived = 0;
int done = 0;
- // pthread_mutex_lock(&mMplMutex);
- // pthread_mutex_lock(&mHALMutex);
-
done = mCompassSensor->readSample(mCachedCompassData, &mCompassTimestamp);
#ifdef COMPASS_YAS53x
if (mCompassSensor->checkCoilsReset()) {
@@ -2057,9 +2036,6 @@ int MPLSensor::readCompassEvents(sensors_event_t* /*data*/, int count)
}
}
- // pthread_mutex_unlock(&mMplMutex);
- // pthread_mutex_unlock(&mHALMutex);
-
return numEventReceived;
}