aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/atmel_mxt_ts.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/touchscreen/atmel_mxt_ts.c')
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 9f8dd973e5f5..55855b8c2efd 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -904,17 +904,13 @@ static ssize_t mxt_object_show(struct device *dev,
904 for (i = 0; i < data->info.object_num; i++) { 904 for (i = 0; i < data->info.object_num; i++) {
905 object = data->object_table + i; 905 object = data->object_table + i;
906 906
907 count += snprintf(buf + count, PAGE_SIZE - count, 907 count += scnprintf(buf + count, PAGE_SIZE - count,
908 "Object[%d] (Type %d)\n", 908 "Object[%d] (Type %d)\n",
909 i + 1, object->type); 909 i + 1, object->type);
910 if (count >= PAGE_SIZE)
911 return PAGE_SIZE - 1;
912 910
913 if (!mxt_object_readable(object->type)) { 911 if (!mxt_object_readable(object->type)) {
914 count += snprintf(buf + count, PAGE_SIZE - count, 912 count += scnprintf(buf + count, PAGE_SIZE - count,
915 "\n"); 913 "\n");
916 if (count >= PAGE_SIZE)
917 return PAGE_SIZE - 1;
918 continue; 914 continue;
919 } 915 }
920 916
@@ -924,15 +920,11 @@ static ssize_t mxt_object_show(struct device *dev,
924 if (error) 920 if (error)
925 return error; 921 return error;
926 922
927 count += snprintf(buf + count, PAGE_SIZE - count, 923 count += scnprintf(buf + count, PAGE_SIZE - count,
928 "\t[%2d]: %02x (%d)\n", j, val, val); 924 "\t[%2d]: %02x (%d)\n", j, val, val);
929 if (count >= PAGE_SIZE)
930 return PAGE_SIZE - 1;
931 } 925 }
932 926
933 count += snprintf(buf + count, PAGE_SIZE - count, "\n"); 927 count += scnprintf(buf + count, PAGE_SIZE - count, "\n");
934 if (count >= PAGE_SIZE)
935 return PAGE_SIZE - 1;
936 } 928 }
937 929
938 return count; 930 return count;