summaryrefslogtreecommitdiffstats
path: root/60xx/libsensors_iio/MPLSensor.cpp
diff options
context:
space:
mode:
authorNanik Tolaram <nanikjava@gmail.com>2015-02-08 20:47:12 +1100
committerNanik Tolaram <nanikjava@gmail.com>2015-02-10 09:38:34 +1100
commitc6d4eb148176eac8d025ef720a20d13b9e54a56d (patch)
tree6c57fb081a017af68726a07c21f7c23bc5017d5d /60xx/libsensors_iio/MPLSensor.cpp
parentba7cc9d1dadbb8783e8059e2ec5b2a52a57b9e72 (diff)
downloadandroid_hardware_invensense-c6d4eb148176eac8d025ef720a20d13b9e54a56d.tar.gz
android_hardware_invensense-c6d4eb148176eac8d025ef720a20d13b9e54a56d.tar.bz2
android_hardware_invensense-c6d4eb148176eac8d025ef720a20d13b9e54a56d.zip
Remove dead code
* Delete dead code that are not used in 60xx/ folder especially inside libsensors/ and libsensors_iio/ * Format code to make it cleaner and easier to view Change-Id: I22361b105cc80b64243906fdf85cf402037763f9 Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
Diffstat (limited to '60xx/libsensors_iio/MPLSensor.cpp')
-rw-r--r--60xx/libsensors_iio/MPLSensor.cpp24
1 files changed, 0 insertions, 24 deletions
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;
}