diff options
author | Daniel Kurtz <djkurtz@chromium.org> | 2012-06-28 09:08:09 -0400 |
---|---|---|
committer | Henrik Rydberg <rydberg@euromail.se> | 2012-06-29 09:58:03 -0400 |
commit | 91630955cb4c9899aa4521d1459837c66c5e9c7a (patch) | |
tree | 617cf985a9a23ad17e6192bb3c6c045caea344c1 /drivers/input/touchscreen/atmel_mxt_ts.c | |
parent | 43a91d51d3750dd9d5a6e5d14e9250a51f01f3c1 (diff) |
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>
Diffstat (limited to 'drivers/input/touchscreen/atmel_mxt_ts.c')
-rw-r--r-- | drivers/input/touchscreen/atmel_mxt_ts.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 94dd1d156a9..c8cfd7b3dc9 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c | |||
@@ -897,15 +897,11 @@ static ssize_t mxt_object_show(struct device *dev, | |||
897 | for (i = 0; i < data->info.object_num; i++) { | 897 | for (i = 0; i < data->info.object_num; i++) { |
898 | object = data->object_table + i; | 898 | object = data->object_table + i; |
899 | 899 | ||
900 | count += scnprintf(buf + count, PAGE_SIZE - count, | 900 | if (!mxt_object_readable(object->type)) |
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"); | ||
907 | continue; | 901 | continue; |
908 | } | 902 | |
903 | count += scnprintf(buf + count, PAGE_SIZE - count, | ||
904 | "T%u:\n", object->type); | ||
909 | 905 | ||
910 | error = __mxt_read_reg(data->client, object->start_address, | 906 | error = __mxt_read_reg(data->client, object->start_address, |
911 | object->size + 1, obuf); | 907 | object->size + 1, obuf); |