From: Patrick Porlan Date: Tue, 27 May 2014 15:14:17 +0000 (+0200) Subject: STPK-1429 Ignore _en status when building report maps X-Git-Tag: android-x86-7.1-r1~72^2~11 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0545bfbd98f3f4c6af3cc76d2a05e968ef0242da;p=android-x86%2Fhardware-intel-libsensors.git STPK-1429 Ignore _en status when building report maps Whether a sensor is enabled or not is irrelevant to the mapping between device report slots and individual sensors reports. Again this is a remnant of a very dynamic, but false, understanding of the structure of the buffers read from a iio character device. Issue: STPK-1429 Change-Id: Idf1727153c6786c449da2df029906e040906a319 Signed-off-by: Patrick Porlan --- diff --git a/control.c b/control.c index 258537f..d8372bf 100644 --- a/control.c +++ b/control.c @@ -74,20 +74,19 @@ void build_sensor_report_maps(int dev_num) int c; int n; int i; - int ch_enabled; int ch_index; char* ch_spec; char spec_buf[MAX_TYPE_SPEC_LEN]; struct datum_info_t* ch_info; int size; char sysfs_path[PATH_MAX]; - int active_channels; + int known_channels; int offset; int channel_size_from_index[MAX_SENSORS * MAX_CHANNELS] = { 0 }; int sensor_handle_from_index[MAX_SENSORS * MAX_CHANNELS] = { 0 }; int channel_number_from_index[MAX_SENSORS * MAX_CHANNELS] = { 0 }; - active_channels = 0; + known_channels = 0; /* For each sensor that is linked to this device */ for (s=0; s