1
0
Fork 0

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>
hifive-unleashed-5.1
Wolfram Sang 2017-11-04 21:20:03 +01:00 committed by Wolfram Sang
parent e94bc5d18b
commit 978336d48d
1 changed files with 2 additions and 0 deletions

View File

@ -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