i2c-hid: fix i2-hid retry bugs

Before it was static value.

Signed-off-by: xianbing Zhu <xianbing.zhu@linux.alibaba.com>
This commit is contained in:
xianbing Zhu
2024-02-28 14:50:31 +08:00
committed by Han Gao
parent f50a437148
commit 4e582eb6b3

View File

@@ -262,7 +262,7 @@ static int __i2c_hid_command(struct i2c_client *client,
if (wait)
set_bit(I2C_HID_RESET_PENDING, &ihid->flags);
static int retry = 10;
int retry = 10;
while(retry) {
ret = i2c_transfer(client->adapter, msg, msg_num);