diff options
author | Super Liu <supercjliu@google.com> | 2023-03-09 09:28:31 +0000 |
---|---|---|
committer | Super Liu <supercjliu@google.com> | 2023-03-29 06:30:39 +0000 |
commit | 901977ca79d2e3292fb33bc9a0729141ff2f2c87 (patch) | |
tree | 9c293b88b6ac29b9cbd96847623a246cc1ae86d1 /goodix_ts_utils.c | |
parent | 253ad573c516c2d46424d98ca2cdae07d2c8f555 (diff) | |
download | goodix_touch-901977ca79d2e3292fb33bc9a0729141ff2f2c87.tar.gz |
touch/goodix: Import driver v1.2.5
Bug: 272408020
Change-Id: I6ce72a2c502cdcaa85059fdb8e2bbdb28f6b9835
Signed-off-by: Super Liu <supercjliu@google.com>
Diffstat (limited to 'goodix_ts_utils.c')
-rw-r--r-- | goodix_ts_utils.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/goodix_ts_utils.c b/goodix_ts_utils.c index 7649759..c3fc33e 100644 --- a/goodix_ts_utils.c +++ b/goodix_ts_utils.c @@ -69,7 +69,7 @@ int checksum_cmp(const u8 *data, int size, int mode) u32 cal_checksum = 0; u32 r_checksum = 0; u32 i; - bool is_valid = !is_risk_data(data, size); + bool is_valid = !is_risk_data(data, size); /* [GOOG] */ if (mode == CHECKSUM_MODE_U8_LE) { if (size < 2) @@ -123,7 +123,11 @@ u32 goodix_get_file_config_id(u8 *ic_config) return le32_to_cpup((__le32 *)&ic_config[CONFIG_ID_OFFSET]); } -/* matrix transpose */ +/* + * matrix transpose: + * [GOOG] + * Add 'dest' as optional target(pa/2221748). + */ void goodix_rotate_abcd2cbad(int tx, int rx, s16 *src, s16 *dest) { s16 *temp_buf = dest; @@ -132,10 +136,14 @@ void goodix_rotate_abcd2cbad(int tx, int rx, s16 *src, s16 *dest) s16 *curr; int index_org = 0; + /* + * [GOOG] + * If no 'dest' assign, 'src' will be overwrote. + */ if (dest == NULL) { temp_buf = kcalloc(size, sizeof(s16), GFP_KERNEL); if (!temp_buf) { - ts_err("malloc failed"); + ts_err("%s: malloc failed!\n", __func__); return; } } @@ -152,6 +160,7 @@ void goodix_rotate_abcd2cbad(int tx, int rx, s16 *src, s16 *dest) memcpy(src, temp_buf, size * sizeof(s16)); kfree(temp_buf); } + /*~[GOOG] */ } /* get ic type */ |