linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hid: fix picolcd's version parsing
@ 2010-04-25 19:31 Bruno Prémont
  2010-04-26  9:44 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Bruno Prémont @ 2010-04-25 19:31 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-kernel, linux-input

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>
---
 drivers/hid/hid-picolcd.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c
index 0fbc7d3..6f71c60 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");
-- 
1.6.4.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hid: fix picolcd's version parsing
  2010-04-25 19:31 [PATCH] hid: fix picolcd's version parsing Bruno Prémont
@ 2010-04-26  9:44 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2010-04-26  9:44 UTC (permalink / raw)
  To: Bruno Prémont; +Cc: linux-kernel, linux-input

On Sun, 25 Apr 2010, Bruno Prémont wrote:

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

Applied, thanks Bruno.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-26  9:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-25 19:31 [PATCH] hid: fix picolcd's version parsing Bruno Prémont
2010-04-26  9:44 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).