From: Florian Ragwitz Date: Tue, 27 Apr 2010 07:45:10 +0000 (-0700) Subject: Input: elantech - fix firmware version check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=225c61aad38b12924b3df5f4ef43150c0d6bae8c;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Input: elantech - fix firmware version check 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index b27684f267bf..28eba48e68fd 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -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;