Commit 91630955cb4c9899aa4521d1459837c66c5e9c7a
Committed by
Henrik Rydberg
1 parent
43a91d51d3
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
Input: atmel_mxt_ts - print less overhead when dumping objects
Conserve limited (PAGE_SIZE) sysfs output buffer space by only showing readable objects and not printing the object's index, which is not useful to userspace. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Showing 1 changed file with 4 additions and 8 deletions Side-by-side Diff
drivers/input/touchscreen/atmel_mxt_ts.c
... | ... | @@ -897,15 +897,11 @@ |
897 | 897 | for (i = 0; i < data->info.object_num; i++) { |
898 | 898 | object = data->object_table + i; |
899 | 899 | |
900 | - count += scnprintf(buf + count, PAGE_SIZE - count, | |
901 | - "Object[%d] (Type %d)\n", | |
902 | - i + 1, object->type); | |
903 | - | |
904 | - if (!mxt_object_readable(object->type)) { | |
905 | - count += scnprintf(buf + count, PAGE_SIZE - count, | |
906 | - "\n"); | |
900 | + if (!mxt_object_readable(object->type)) | |
907 | 901 | continue; |
908 | - } | |
902 | + | |
903 | + count += scnprintf(buf + count, PAGE_SIZE - count, | |
904 | + "T%u:\n", object->type); | |
909 | 905 | |
910 | 906 | error = __mxt_read_reg(data->client, object->start_address, |
911 | 907 | object->size + 1, obuf); |