Skip to content

Commit 5fce154

Browse files
author
Jiri Kosina
committed
Merge branch 'for-6.4/mcp2221' into for-linus
- generic code improvements for mcp2221 driver (Louis Morhet)
2 parents 0549fba + ca6961d commit 5fce154

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/hid/hid-mcp2221.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ struct mcp_get_gpio {
7979
u8 cmd;
8080
u8 dummy;
8181
struct {
82-
u8 direction;
8382
u8 value;
83+
u8 direction;
8484
} gpio[MCP_NGPIO];
8585
} __packed;
8686

@@ -594,7 +594,7 @@ static int mcp_gpio_get(struct gpio_chip *gc,
594594

595595
mcp->txbuf[0] = MCP2221_GPIO_GET;
596596

597-
mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset].value);
597+
mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset]);
598598

599599
mutex_lock(&mcp->lock);
600600
ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
@@ -675,7 +675,7 @@ static int mcp_gpio_get_direction(struct gpio_chip *gc,
675675

676676
mcp->txbuf[0] = MCP2221_GPIO_GET;
677677

678-
mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset].direction);
678+
mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset]);
679679

680680
mutex_lock(&mcp->lock);
681681
ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);

0 commit comments

Comments
 (0)