Commit 86280a20 authored by David Sterba's avatar David Sterba Committed by Jiri Kosina

HID: picolcd: fix misuse of logical operation in place of bitop

CC: Bruno Prémont <bonbons@linux-vserver.org>
CC: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent c25bcd34
...@@ -1544,7 +1544,7 @@ static ssize_t picolcd_debug_eeprom_read(struct file *f, char __user *u, ...@@ -1544,7 +1544,7 @@ static ssize_t picolcd_debug_eeprom_read(struct file *f, char __user *u,
/* prepare buffer with info about what we want to read (addr & len) */ /* prepare buffer with info about what we want to read (addr & len) */
raw_data[0] = *off & 0xff; raw_data[0] = *off & 0xff;
raw_data[1] = (*off >> 8) && 0xff; raw_data[1] = (*off >> 8) & 0xff;
raw_data[2] = s < 20 ? s : 20; raw_data[2] = s < 20 ? s : 20;
if (*off + raw_data[2] > 0xff) if (*off + raw_data[2] > 0xff)
raw_data[2] = 0x100 - *off; raw_data[2] = 0x100 - *off;
...@@ -1583,7 +1583,7 @@ static ssize_t picolcd_debug_eeprom_write(struct file *f, const char __user *u, ...@@ -1583,7 +1583,7 @@ static ssize_t picolcd_debug_eeprom_write(struct file *f, const char __user *u,
memset(raw_data, 0, sizeof(raw_data)); memset(raw_data, 0, sizeof(raw_data));
raw_data[0] = *off & 0xff; raw_data[0] = *off & 0xff;
raw_data[1] = (*off >> 8) && 0xff; raw_data[1] = (*off >> 8) & 0xff;
raw_data[2] = s < 20 ? s : 20; raw_data[2] = s < 20 ? s : 20;
if (*off + raw_data[2] > 0xff) if (*off + raw_data[2] > 0xff)
raw_data[2] = 0x100 - *off; raw_data[2] = 0x100 - *off;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment