diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp
index fb1ebcf..89c4479 100644
--- a/services/sensorservice/SensorService.cpp
+++ b/services/sensorservice/SensorService.cpp
@@ -76,10 +76,6 @@
         sensor_t const* list;
         ssize_t count = dev.getSensorList(&list);
         if (count > 0) {
-            // this is the only place besides the dynamic sensor register and unregister functions
-            // where write operation to various sensor lists has to be locked.
-            Mutex::Autolock _l(mSensorsLock);
-
             ssize_t orientationIndex = -1;
             bool hasGyro = false, hasAccel = false, hasMag = false;
             uint32_t virtualSensorsNeeds =
@@ -247,9 +243,6 @@
 }
 
 Sensor SensorService::registerSensor(SensorInterface* s) {
-    //caller of this function has to make sure mSensorsLock is locked
-    assert(mSensorsLock.tryLock() != 0);
-
     const Sensor sensor(s->getSensor());
 
     // add handle to used handle list
@@ -265,8 +258,6 @@
 }
 
 Sensor SensorService::registerDynamicSensor(SensorInterface* s) {
-    Mutex::Autolock _l(mSensorsLock);
-
     Sensor sensor = registerSensor(s);
     mDynamicSensorList.add(sensor);
 
@@ -278,8 +269,6 @@
 }
 
 bool SensorService::unregisterDynamicSensor(int handle) {
-    Mutex::Autolock _l(mSensorsLock);
-
     bool found = false;
 
     for (size_t i = 0 ; i < mSensorList.size() ; i++) {
@@ -310,7 +299,6 @@
 }
 
 bool SensorService::isNewHandle(int handle) {
-    Mutex::Autolock _l(mSensorsLock);
     for (int h : mUsedHandleList) {
         if (h == handle) {
             return false;
@@ -320,7 +308,6 @@
 }
 
 SensorService::~SensorService() {
-    Mutex::Autolock _l(mSensorsLock);
     for (size_t i=0 ; i<mSensorMap.size() ; i++) {
         delete mSensorMap.valueAt(i);
     }
@@ -392,7 +379,6 @@
         } else {
             // Default dump the sensor list and debugging information.
             result.append("Sensor List:\n");
-            Mutex::Autolock _l(mSensorsLock);
             for (size_t i=0 ; i<mSensorList.size() ; i++) {
                 const Sensor& s(mSensorList[i]);
                 result.appendFormat(
@@ -816,7 +802,6 @@
 }
 
 String8 SensorService::getSensorName(int handle) const {
-    Mutex::Autolock _l(mSensorsLock);
     size_t count = mUserSensorList.size();
     for (size_t i=0 ; i<count ; i++) {
         const Sensor& sensor(mUserSensorList[i]);
@@ -846,8 +831,6 @@
 }
 
 Vector<Sensor> SensorService::getSensorList(const String16& opPackageName) {
-    Mutex::Autolock _l(mSensorsLock);
-
     char value[PROPERTY_VALUE_MAX];
     property_get("debug.sensors", value, "0");
     const Vector<Sensor>& initialSensorList = (atoi(value)) ?
@@ -868,8 +851,6 @@
 }
 
 Vector<Sensor> SensorService::getDynamicSensorList(const String16& opPackageName) {
-    Mutex::Autolock _l(mSensorsLock);
-
     Vector<Sensor> accessibleSensorList;
     for (size_t i = 0; i < mDynamicSensorList.size(); i++) {
         Sensor sensor = mDynamicSensorList[i];
@@ -973,7 +954,6 @@
 }
 
 SensorInterface* SensorService::getSensorInterfaceFromHandle(int handle) const {
-    Mutex::Autolock _l(mSensorsLock);
     ssize_t index = mSensorMap.indexOfKey(handle);
     return index < 0 ? nullptr : mSensorMap.valueAt(index);
 }
diff --git a/services/sensorservice/SensorService.h b/services/sensorservice/SensorService.h
index 35f6f3d..2c802fa 100644
--- a/services/sensorservice/SensorService.h
+++ b/services/sensorservice/SensorService.h
@@ -214,7 +214,6 @@
     status_t resetToNormalModeLocked();
 
     // lists and maps
-    mutable Mutex mSensorsLock;
     Vector<Sensor> mSensorList;
     Vector<Sensor> mUserSensorListDebug;
     Vector<Sensor> mUserSensorList;
