aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-picolcd.c
diff options
context:
space:
mode:
authorBruno Prémont <bonbons@linux-vserver.org>2010-04-25 15:31:40 -0400
committerJiri Kosina <jkosina@suse.cz>2010-04-26 05:44:09 -0400
commit76d17e6ca30204532c631d092de41febb3f76b77 (patch)
treefe51a016479da06ec6dd910cf97b11d063b1883d /drivers/hid/hid-picolcd.c
parent5435f2818ea08bcb381dcd2a99b1607b2a42f329 (diff)
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/hid-picolcd.c')
-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)
1196 } 1196 }
1197 1197
1198 if (verinfo->raw_size == 2) { 1198 if (verinfo->raw_size == 2) {
1199 data->version[0] = verinfo->raw_data[1];
1200 data->version[1] = verinfo->raw_data[0];
1199 if (data->status & PICOLCD_BOOTLOADER) { 1201 if (data->status & PICOLCD_BOOTLOADER) {
1200 dev_info(&hdev->dev, "PicoLCD, bootloader version %d.%d\n", 1202 dev_info(&hdev->dev, "PicoLCD, bootloader version %d.%d\n",
1201 verinfo->raw_data[0], verinfo->raw_data[1]); 1203 verinfo->raw_data[1], verinfo->raw_data[0]);
1202 data->version[0] = verinfo->raw_data[0];
1203 data->version[1] = verinfo->raw_data[1];
1204 } else { 1204 } else {
1205 dev_info(&hdev->dev, "PicoLCD, firmware version %d.%d\n", 1205 dev_info(&hdev->dev, "PicoLCD, firmware version %d.%d\n",
1206 verinfo->raw_data[1], verinfo->raw_data[0]); 1206 verinfo->raw_data[1], verinfo->raw_data[0]);
1207 data->version[0] = verinfo->raw_data[1];
1208 data->version[1] = verinfo->raw_data[0];
1209 } 1207 }
1210 } else { 1208 } else {
1211 dev_err(&hdev->dev, "confused, got unexpected version response from PicoLCD\n"); 1209 dev_err(&hdev->dev, "confused, got unexpected version response from PicoLCD\n");