From: David Sterba Date: Mon, 27 Dec 2010 15:27:43 +0000 (+0100) Subject: HID: picolcd: fix misuse of logical operation in place of bitop X-Git-Tag: v3.12-rc1~7817^2~7^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86280a208825d55ba988420b6b0ed2d6b9ec80f8;p=kernel%2Fkernel-generic.git HID: picolcd: fix misuse of logical operation in place of bitop CC: Bruno Prémont CC: Jiri Kosina Signed-off-by: David Sterba Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c index bc2e077..0aff3cd 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, /* 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;