]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/hid/hid-picolcd.c
HID: picolcd: fix misuse of logical operation in place of bitop
[mv-sheeva.git] / drivers / hid / hid-picolcd.c
index bc2e0774062864667ca92c52e3b4e7a23d923f53..0aff3cdddd83f77dcc5aabfe05cfa218ebbbfc22 100644 (file)
@@ -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;