OSDN Git Service

Reinstate monotonic timestamp in data acquisition threads
[android-x86/hardware-intel-libsensors.git] / enumeration.c
index 91c156b..c6fd7a3 100644 (file)
@@ -14,7 +14,6 @@
 #include "description.h"
 #include "control.h"
 #include "calibration.h"
-#include "filtering.h"
 
 /*
  * This table maps syfs entries in scan_elements directories to sensor types,
@@ -365,6 +364,9 @@ static void add_sensor (int dev_num, int catalog_index, int use_polling)
        sensor_desc[s].fifoReservedEventCount = 0;
        sensor_desc[s].fifoMaxEventCount = 0;
 
+       /* Populate the quirks array */
+       sensor_get_quirks(s);
+
        if (sensor_info[s].internal_name[0] == '\0') {
                /*
                 * In case the kernel-mode driver doesn't expose a name for
@@ -379,7 +381,6 @@ static void add_sensor (int dev_num, int catalog_index, int use_polling)
                sensor_type == SENSOR_TYPE_GYROSCOPE_UNCALIBRATED) {
                struct gyro_cal* calibration_data = calloc(1, sizeof(struct gyro_cal));
                sensor_info[s].cal_data = calibration_data;
-               denoise_median_init(s, 3, 7);
        }
 
        if (sensor_type == SENSOR_TYPE_MAGNETIC_FIELD) {
@@ -801,6 +802,7 @@ void delete_enumeration_data (void)
                                sensor_info[i].cal_level = 0;
                        }
                        break;
+
                case SENSOR_TYPE_GYROSCOPE_UNCALIBRATED:
                case SENSOR_TYPE_GYROSCOPE:
                        if (sensor_info[i].cal_data != NULL) {
@@ -809,9 +811,7 @@ void delete_enumeration_data (void)
                                sensor_info[i].cal_level = 0;
                        }
                        break;
-                       if (sensor_info[i].filter != NULL) {
-                               denoise_median_release(i);
-                       }
+
                default:
                        break;
        }
@@ -820,8 +820,8 @@ void delete_enumeration_data (void)
 }
 
 
-int get_sensors_list struct sensors_module_t* module,
-                       struct sensor_t const** list)
+int get_sensors_list (__attribute__((unused)) struct sensors_module_t* module,
+                     struct sensor_t const** list)
 {
        *list = sensor_desc;
        return sensor_count;