Message ID | 1347888932.7521.2.camel@phoenix (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Jiri Kosina |
Headers | show |
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; }
This simplify the implementation. Signed-off-by: Axel Lin <axel.lin@gmail.com> --- drivers/hid/hid-cypress.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)