diff options
author | David Sterba <dsterba@suse.cz> | 2010-12-27 10:27:43 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-12-27 10:38:16 -0500 |
commit | 86280a208825d55ba988420b6b0ed2d6b9ec80f8 (patch) | |
tree | a8b4675187a8198567cbe0286dcaffb3c8379bfe /drivers/hid/hid-picolcd.c | |
parent | c25bcd340033bf5b8dc30c16a99e64259f099446 (diff) |
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: David Sterba <dsterba@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-picolcd.c')
-rw-r--r-- | drivers/hid/hid-picolcd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c index bc2e07740628..0aff3cdddd83 100644 --- a/drivers/hid/hid-picolcd.c +++ b/drivers/hid/hid-picolcd.c | |||
@@ -1544,7 +1544,7 @@ static ssize_t picolcd_debug_eeprom_read(struct file *f, char __user *u, | |||
1544 | 1544 | ||
1545 | /* prepare buffer with info about what we want to read (addr & len) */ | 1545 | /* prepare buffer with info about what we want to read (addr & len) */ |
1546 | raw_data[0] = *off & 0xff; | 1546 | raw_data[0] = *off & 0xff; |
1547 | raw_data[1] = (*off >> 8) && 0xff; | 1547 | raw_data[1] = (*off >> 8) & 0xff; |
1548 | raw_data[2] = s < 20 ? s : 20; | 1548 | raw_data[2] = s < 20 ? s : 20; |
1549 | if (*off + raw_data[2] > 0xff) | 1549 | if (*off + raw_data[2] > 0xff) |
1550 | raw_data[2] = 0x100 - *off; | 1550 | raw_data[2] = 0x100 - *off; |
@@ -1583,7 +1583,7 @@ static ssize_t picolcd_debug_eeprom_write(struct file *f, const char __user *u, | |||
1583 | 1583 | ||
1584 | memset(raw_data, 0, sizeof(raw_data)); | 1584 | memset(raw_data, 0, sizeof(raw_data)); |
1585 | raw_data[0] = *off & 0xff; | 1585 | raw_data[0] = *off & 0xff; |
1586 | raw_data[1] = (*off >> 8) && 0xff; | 1586 | raw_data[1] = (*off >> 8) & 0xff; |
1587 | raw_data[2] = s < 20 ? s : 20; | 1587 | raw_data[2] = s < 20 ? s : 20; |
1588 | if (*off + raw_data[2] > 0xff) | 1588 | if (*off + raw_data[2] > 0xff) |
1589 | raw_data[2] = 0x100 - *off; | 1589 | raw_data[2] = 0x100 - *off; |