mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
HID: picolcd: fix misuse of logical operation in place of bitop
CC: Bruno Prémont <[email protected]> CC: Jiri Kosina <[email protected]> Signed-off-by: David Sterba <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
c25bcd3400
commit
86280a2088
1 changed files with 2 additions and 2 deletions
|
|
@ -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) */
|
||||
raw_data[0] = *off & 0xff;
|
||||
raw_data[1] = (*off >> 8) && 0xff;
|
||||
raw_data[1] = (*off >> 8) & 0xff;
|
||||
raw_data[2] = s < 20 ? s : 20;
|
||||
if (*off + raw_data[2] > 0xff)
|
||||
raw_data[2] = 0x100 - *off;
|
||||
|
|
@ -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));
|
||||
raw_data[0] = *off & 0xff;
|
||||
raw_data[1] = (*off >> 8) && 0xff;
|
||||
raw_data[1] = (*off >> 8) & 0xff;
|
||||
raw_data[2] = s < 20 ? s : 20;
|
||||
if (*off + raw_data[2] > 0xff)
|
||||
raw_data[2] = 0x100 - *off;
|
||||
|
|
|
|||
Loading…
Reference in a new issue