Merge android-msm-floral-4.14 into android-msm-pixel-4.14
Bug: 149536833
Change-Id: I08a58cb15fed67b2a41d51fdee7f3b20ed541dd4
Signed-off-by: Wilson Sung <wilsonsung@google.com>
diff --git a/fts.c b/fts.c
index 0d8205e..34746fc 100644
--- a/fts.c
+++ b/fts.c
@@ -3666,7 +3666,7 @@
fts_write(command, ARRAY_SIZE(command));
}
-static bool read_heatmap_raw(struct v4l2_heatmap *v4l2, strength_t *data)
+static bool read_heatmap_raw(struct v4l2_heatmap *v4l2)
{
struct fts_ts_info *info =
container_of(v4l2, struct fts_ts_info, v4l2);
@@ -3730,7 +3730,7 @@
/* set all to zero, will only write to non-zero locations in
* the loop
*/
- memset(data, 0, max_x * max_y * sizeof(data[0]));
+ memset(v4l2->frame, 0, v4l2->format.sizeimage);
/* populate the data buffer, rearranging into final locations */
for (local_i = 0; local_i < num_elements; local_i++) {
/* enforce little-endian order */
@@ -3752,7 +3752,7 @@
return false;
}
frame_i = heatmap_y * max_x + heatmap_x;
- data[frame_i] = heatmap_value;
+ v4l2->frame[frame_i] = heatmap_value;
}
} else if (info->heatmap_mode == FTS_HEATMAP_FULL) {
MutualSenseFrame ms_frame = { 0 };
@@ -3780,7 +3780,7 @@
((max_x-1) - x) * max_y +
((max_y-1) - y)];
}
- data[frame_index++] = heatmap_value;
+ v4l2->frame[frame_index++] = heatmap_value;
}
}