Skip to content

Commit

Permalink
Input: elantech - fix firmware version check
Browse files Browse the repository at this point in the history
The check determining whether device should use 4- or 6-byte packets
was trying to compare firmware with 2.48, but was failing on majors
greater than 2. The new check ensures that versions like 4.1 are
checked properly.

Signed-off-by: Florian Ragwitz <rafl@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Florian Ragwitz authored and Dmitry Torokhov committed May 4, 2010
1 parent 5132088 commit 225c61a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/input/mouse/elantech.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,8 @@ int elantech_init(struct psmouse *psmouse)
* Assume every version greater than this is new EeePC style
* hardware with 6 byte packets
*/
if (etd->fw_version_maj >= 0x02 && etd->fw_version_min >= 0x30) {
if ((etd->fw_version_maj == 0x02 && etd->fw_version_min >= 0x30) ||
etd->fw_version_maj > 0x02) {
etd->hw_version = 2;
/* For now show extra debug information */
etd->debug = 1;
Expand Down

0 comments on commit 225c61a

Please sign in to comment.