This simplify the implementation.

Signed-off-by: Axel Lin <axel....@gmail.com>
---
 drivers/hid/hid-cypress.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/hid/hid-cypress.c b/drivers/hid/hid-cypress.c
index 3e159a5..3b795a2 100644
--- a/drivers/hid/hid-cypress.c
+++ b/drivers/hid/hid-cypress.c
@@ -41,13 +41,9 @@ static __u8 *cp_report_fixup(struct hid_device *hdev, __u8 
*rdesc,
 
        for (i = 0; i < *rsize - 4; i++)
                if (rdesc[i] == 0x29 && rdesc[i + 2] == 0x19) {
-                       __u8 tmp;
-
                        rdesc[i] = 0x19;
                        rdesc[i + 2] = 0x29;
-                       tmp = rdesc[i + 3];
-                       rdesc[i + 3] = rdesc[i + 1];
-                       rdesc[i + 1] = tmp;
+                       swap(rdesc[i + 1], rdesc[i + 3]);
                }
        return rdesc;
 }
-- 
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to