summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorBruno Prémont <bonbons@linux-vserver.org>2010-04-25 21:31:40 +0200
committerJiri Kosina <jkosina@suse.cz>2010-04-26 11:44:09 +0200
commit76d17e6ca30204532c631d092de41febb3f76b77 (patch)
treefe51a016479da06ec6dd910cf97b11d063b1883d /drivers/hid
parent5435f2818ea08bcb381dcd2a99b1607b2a42f329 (diff)
downloadlinux-76d17e6ca30204532c631d092de41febb3f76b77.tar.bz2
HID: fix picolcd's version parsing
During grouping of version checking code bootloader mode's version bytes got swapped. Fix their order. Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-picolcd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c
index 0fbc7d396164..6f71c60bf653 100644
--- a/drivers/hid/hid-picolcd.c
+++ b/drivers/hid/hid-picolcd.c
@@ -1196,16 +1196,14 @@ static int picolcd_check_version(struct hid_device *hdev)
}
if (verinfo->raw_size == 2) {
+ data->version[0] = verinfo->raw_data[1];
+ data->version[1] = verinfo->raw_data[0];
if (data->status & PICOLCD_BOOTLOADER) {
dev_info(&hdev->dev, "PicoLCD, bootloader version %d.%d\n",
- verinfo->raw_data[0], verinfo->raw_data[1]);
- data->version[0] = verinfo->raw_data[0];
- data->version[1] = verinfo->raw_data[1];
+ verinfo->raw_data[1], verinfo->raw_data[0]);
} else {
dev_info(&hdev->dev, "PicoLCD, firmware version %d.%d\n",
verinfo->raw_data[1], verinfo->raw_data[0]);
- data->version[0] = verinfo->raw_data[1];
- data->version[1] = verinfo->raw_data[0];
}
} else {
dev_err(&hdev->dev, "confused, got unexpected version response from PicoLCD\n");