i2c: mediatek: Use DMA safe buffers for i2c transactions
authorJun Gao <jun.gao@mediatek.com>
Thu, 6 Sep 2018 13:15:29 +0000 (21:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 17:46:01 +0000 (18:46 +0100)
commit4d8d651e1c5f1dde2f5d7e5d21d88e0b4a4963f4
tree87e57031334cc4d9b4a809b9d214b9af6fa7bdca
parentd0d8f0efb6bd528d9bb2edbd5f7cb42ddea19467
i2c: mediatek: Use DMA safe buffers for i2c transactions

[ Upstream commit fc66b39fe36acfd06f716e338de7cd8f9550fad2 ]

DMA mode will always be used in i2c transactions, try to allocate
a DMA safe buffer if the buf of struct i2c_msg used is not DMA safe.

Signed-off-by: Jun Gao <jun.gao@mediatek.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-mt65xx.c