mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
Revert "Input: rmi4 - fix register descriptor address calculation"
The register descriptor presence register is a packet register, which
means its bytes share a single RMI address. It does not occupy
consecutive addresses, and the register structure that follows it
is located at the next RMI address (presence_address + 1), not
(presence_address + presence_size).
Revert the incorrect address calculation introduced in commit
a98518e724.
Reported-by: "Barry K. Nathan" <barryn@pobox.com>
Tested-by: "Barry K. Nathan" <barryn@pobox.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
d577e46785
commit
d85589879f
|
|
@ -643,7 +643,7 @@ int rmi_read_register_desc(struct rmi_device *d, u16 addr,
|
|||
ret = rmi_read_block(d, addr, buf, size_presence_reg);
|
||||
if (ret)
|
||||
return ret;
|
||||
addr += size_presence_reg;
|
||||
++addr;
|
||||
|
||||
if (buf[0] == 0) {
|
||||
if (size_presence_reg < 3)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user