aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-dev.c
diff options
context:
space:
mode:
authorWolfram Sang2017-11-04 21:20:03 +0100
committerWolfram Sang2017-12-03 21:19:32 +0100
commit978336d48d887d6deb7793e0d20a4673f357fb8e (patch)
tree21708922404ccee4c71642e78d0ed30d8060ebf3 /drivers/i2c/i2c-dev.c
parente94bc5d18be03dac8e9d73d30c5523728edeff76 (diff)
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>
Diffstat (limited to 'drivers/i2c/i2c-dev.c')
-rw-r--r--drivers/i2c/i2c-dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index 2cab27a68479..036a03f0d0a6 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -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