]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i3c: Remove the const qualifier from i2c_msg pointer in i2c_xfers API
authorBilly Tsai <billy_tsai@aspeedtech.com>
Tue, 4 Feb 2025 09:17:01 +0000 (17:17 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 20 Feb 2025 21:54:28 +0000 (22:54 +0100)
commit6866c91f8c2327546d850d5a85025fb81e2089bf
tree8979d45021cbff87f66ca552c0046d24a4cc2679
parentbdffad83d75608eb6289858909fafcc72f046547
i3c: Remove the const qualifier from i2c_msg pointer in i2c_xfers API

The change is necessary to enable the use of the
`i2c_get_dma_safe_msg_buf()` API, which requires a non-const
`struct i2c_msg *` to operate. The `i2c_get_dma_safe_msg_buf()` function
ensures safe handling of I2C messages when using DMA, making it essential
for scenarios where DMA transfers are involved. By removing the `const`
qualifier, this patch allows drivers to prepare and manage DMA-safe
buffers directly.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
Link: https://lore.kernel.org/r/20250204091702.4014466-1-billy_tsai@aspeedtech.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/dw-i3c-master.c
drivers/i3c/master/i3c-master-cdns.c
drivers/i3c/master/mipi-i3c-hci/core.c
drivers/i3c/master/svc-i3c-master.c
include/linux/i3c/master.h