Skip to contentSkip to conversation

hid: fix picolcd's version parsing

PATCH Applied Bruno Prémont 2 participants 2 messages Apr 25, 2010 – Apr 26, 2010

Subsystems (2)
lore
Share & tools
lore

Bruno Prémont

author maintainer
#0 lore raw

PATCH 1/1 hid: fix picolcd's version parsing

During grouping of version checking code bootloader mode's version bytes got swapped. Fix their order.

---
 drivers/hid/hid-picolcd.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
drivers/hid/hid-picolcd.c +3 -5
index 0fbc7d3..6f71c60 100644
@@ -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");
Signature · 1 line
1.6.4.4
Applied
#1 lore raw
Quoted 2 lines · Bruno Prémont

During grouping of version checking code bootloader mode's version bytes got swapped. Fix their order.

Applied, thanks Bruno.

Signature · 6 lines
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html