Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269491
b: refs/heads/master
c: 626af86
h: refs/heads/master
i:
  269489: a6b00a5
  269487: 25f5327
v: v3
  • Loading branch information
Daniel Kurtz authored and Dmitry Torokhov committed Oct 7, 2011
1 parent d8afddb commit 42ebd01
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 04c59abd3c053f9a42437d5db3af4383cf68659c
refs/heads/master: 626af8611211c55595cd316103abd2419cd4d861
21 changes: 15 additions & 6 deletions trunk/drivers/input/touchscreen/atmel_mxt_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,12 +910,17 @@ static ssize_t mxt_object_show(struct device *dev,
for (i = 0; i < data->info.object_num; i++) {
object = data->object_table + i;

count += sprintf(buf + count,
"Object Table Element %d(Type %d)\n",
count += snprintf(buf + count, PAGE_SIZE - count,
"Object[%d] (Type %d)\n",
i + 1, object->type);
if (count >= PAGE_SIZE)
return PAGE_SIZE - 1;

if (!mxt_object_readable(object->type)) {
count += sprintf(buf + count, "\n");
count += snprintf(buf + count, PAGE_SIZE - count,
"\n");
if (count >= PAGE_SIZE)
return PAGE_SIZE - 1;
continue;
}

Expand All @@ -925,11 +930,15 @@ static ssize_t mxt_object_show(struct device *dev,
if (error)
return error;

count += sprintf(buf + count,
" Byte %d: 0x%x (%d)\n", j, val, val);
count += snprintf(buf + count, PAGE_SIZE - count,
"\t[%2d]: %02x (%d)\n", j, val, val);
if (count >= PAGE_SIZE)
return PAGE_SIZE - 1;
}

count += sprintf(buf + count, "\n");
count += snprintf(buf + count, PAGE_SIZE - count, "\n");
if (count >= PAGE_SIZE)
return PAGE_SIZE - 1;
}

return count;
Expand Down

0 comments on commit 42ebd01

Please sign in to comment.