summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2020-07-23 02:06:45 +0300
committerMichael Bestas <mkbestas@lineageos.org>2020-07-23 02:09:11 +0300
commit3027892bdc5cd8d7fe44475543fe06a8bd1e0796 (patch)
treed11ab100511bf9bf804d5818d5e23ebcaa3ea803
parentc4641a020b4d0888ff268dc3035db39b6df99b21 (diff)
Revert "input: touchscren: st: Remove unnecessary parentheses"
* We'll take the upstream fix This reverts commit 469a6a56f4dd2a16bc3cad3072250e806b705156. Change-Id: I8ad15bebff59d74eb9434585156f76814d6c47d8
-rw-r--r--drivers/input/touchscreen/st/fts_gui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/st/fts_gui.c b/drivers/input/touchscreen/st/fts_gui.c
index cdb63827844c..f695137ada09 100644
--- a/drivers/input/touchscreen/st/fts_gui.c
+++ b/drivers/input/touchscreen/st/fts_gui.c
@@ -58,7 +58,7 @@ ssize_t fts_i2c_wr_show(struct device *dev, struct device_attribute *attr,
snprintf(buff, sizeof(buff), "{");
strlcat(Out_buff, buff, ARRAY_SIZE(Out_buff));
for (i = 0; i < (byte_count_read+2); i++) {
- if (!i) {
+ if ((i == 0)) {
char temp_byte_count_read = (byte_count_read >> 8) & 0xFF;
snprintf(buff, sizeof(buff), "%02X", temp_byte_count_read);
} else if (i == 1) {
@@ -125,7 +125,7 @@ ssize_t fts_i2c_wr_store(struct device *dev, struct device_attribute *attr,
#ifdef SCRIPTLESS_DEBUG
printk("%s:DATA READ\n{", __func__);
for (i = 0; i < (2+byte_count_read); i++) {
- if (!i) {
+ if ((i == 0)) {
char temp_byte_count_read = (byte_count_read >> 8) & 0xFF;
printk("%02X", (unsigned int)temp_byte_count_read);
} else if (i == 1) {
@@ -173,7 +173,7 @@ ssize_t fts_i2c_read_show(struct device *dev, struct device_attribute *attr,
snprintf(buff, sizeof(buff), "{");
strlcat(Out_buff, buff, ARRAY_SIZE(Out_buff));
for (i = 0; i < (byte_count_read+2); i++) {
- if (!i) {
+ if ((i == 0)) {
char temp_byte_count_read = (byte_count_read >> 8) & 0xFF;
snprintf(buff, sizeof(buff), "%02X", temp_byte_count_read);
} else if (i == 1) {
@@ -241,7 +241,7 @@ ssize_t fts_i2c_read_store(struct device *dev, struct device_attribute *attr,
#ifdef SCRIPTLESS_DEBUG
printk("%s:DATA READ\n{", __func__);
for (i = 0; i < (byte_count_read+2); i++) {
- if (!i) {
+ if ((i == 0)) {
char temp_byte_count_read = (byte_count_read >> 8) & 0xFF;
printk("%02X", (unsigned int)temp_byte_count_read);
} else if (i == 1) {