[PATCH 1/2] HID: mcp2221: fix report layout for gpio get

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The documentation of the component (section 3.1.12 GET GPIO VALUES)
describes the hid report structure with two fields per gpio:
its value, followed by its direction.

However, the driver describes it with a wrong order:
direction followed by value.

Fix the structure representing the report answered by the chip to the
GET GPIO VALUES command.

Fixes commit 567b8e9fed8a ("HID: mcp2221: Fix GPIO output handling")

Signed-off-by: Louis Morhet <lmorhet@xxxxxxxxxxxxx>
---
 drivers/hid/hid-mcp2221.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index f74a977cf8f8..fa20ed4d395a 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -79,8 +79,8 @@ struct mcp_get_gpio {
 	u8 cmd;
 	u8 dummy;
 	struct {
-		u8 direction;
 		u8 value;
+		u8 direction;
 	} gpio[MCP_NGPIO];
 } __packed;
 
-- 
2.17.1








[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux