summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2018-08-24 17:52:44 +0300
committerWolfram Sang <wsa@the-dreams.de>2018-08-31 00:13:15 +0300
commit82fe39a6bc7b866fc3ffd838e3c5a4cadb328b04 (patch)
treede2bb335aac161972201349caa6c8be9a15227e3 /include
parent1204d12a494cf5dff497859a5febf2ae30a28970 (diff)
downloadlinux-82fe39a6bc7b866fc3ffd838e3c5a4cadb328b04.tar.xz
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/i2c.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index b79387fd57da..65b4eaed1d96 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -855,7 +855,7 @@ static inline u8 i2c_8bit_addr_from_msg(const struct i2c_msg *msg)
}
u8 *i2c_get_dma_safe_msg_buf(struct i2c_msg *msg, unsigned int threshold);
-void i2c_release_dma_safe_msg_buf(struct i2c_msg *msg, u8 *buf);
+void i2c_put_dma_safe_msg_buf(u8 *buf, struct i2c_msg *msg, bool xferred);
int i2c_handle_smbus_host_notify(struct i2c_adapter *adap, unsigned short addr);
/**