i2c: dev: mark RDWR buffers as DMA_SAFE
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
e94bc5d18b
commit
978336d48d
1 changed files with 2 additions and 0 deletions
|
@ -264,6 +264,8 @@ static noinline int i2cdev_ioctl_rdwr(struct i2c_client *client,
|
|||
res = PTR_ERR(msgs[i].buf);
|
||||
break;
|
||||
}
|
||||
/* memdup_user allocates with GFP_KERNEL, so DMA is ok */
|
||||
msgs[i].flags |= I2C_M_DMA_SAFE;
|
||||
|
||||
/*
|
||||
* If the message length is received from the slave (similar
|
||||
|
|
Loading…
Reference in a new issue