提交 1c4d6cd4 编写于 作者: D Dmitry Torokhov 提交者: Jiri Kosina

HID: i2c-hid: note that I2C xfer buffers are DMA-safe

All I2C communications in the driver use driver-private buffers that are
DMA-safe, so mark them as such.
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
Tested-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 551117c5
......@@ -180,7 +180,7 @@ static int i2c_hid_xfer(struct i2c_hid *ihid,
__func__, send_len, send_buf);
msgs[n].addr = client->addr;
msgs[n].flags = client->flags & I2C_M_TEN;
msgs[n].flags = (client->flags & I2C_M_TEN) | I2C_M_DMA_SAFE;
msgs[n].len = send_len;
msgs[n].buf = send_buf;
n++;
......@@ -188,7 +188,8 @@ static int i2c_hid_xfer(struct i2c_hid *ihid,
if (recv_len) {
msgs[n].addr = client->addr;
msgs[n].flags = (client->flags & I2C_M_TEN) | I2C_M_RD;
msgs[n].flags = (client->flags & I2C_M_TEN) |
I2C_M_RD | I2C_M_DMA_SAFE;
msgs[n].len = recv_len;
msgs[n].buf = recv_buf;
n++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册