]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: refactor function to release a DMA safe buffer
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Fri, 24 Aug 2018 14:52:44 +0000 (16:52 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 30 Aug 2018 21:13:15 +0000 (23:13 +0200)
commitcb22c2d512dfe33d7f61086e53600d0ebfedcf5d
treede2bb335aac161972201349caa6c8be9a15227e3
parenta8cf3865ae8409c8fba2434e414bf57532e32805
i2c: refactor function to release a DMA safe buffer

a) rename to 'put' instead of 'release' to match 'get' when obtaining
   the buffer
b) change the argument order to have the buffer as first argument
c) add a new argument telling the function if the message was
   transferred. This allows the function to be used also in cases
   where setting up DMA failed, so the buffer needs to be freed without
   syncing to the message buffer.

Also convert the only user.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Documentation/i2c/DMA-considerations
drivers/i2c/busses/i2c-sh_mobile.c
drivers/i2c/i2c-core-base.c
include/linux/i2c.h