diff options
author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2021-06-16 17:59:01 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-06-20 14:16:14 +0300 |
commit | 031e668bc1ad7ccdbfb2b67b838bb6b7cc44ecf3 (patch) | |
tree | eccf1efb750b9d906302484dc9adac8f01fc354c /include/linux/soundwire | |
parent | 29a269c6f54825c643a5c35762a2829ba5be67f6 (diff) | |
download | linux-031e668bc1ad7ccdbfb2b67b838bb6b7cc44ecf3.tar.xz |
soundwire: bus: Make sdw_nwrite() data pointer argument const
Idiomatically, write functions should take const pointers to the
data buffer, as they don't change the data. They are also likely
to be called from functions that receive a const data pointer.
Internally the pointer is passed to function/structs shared with
the read functions, requiring a cast, but this is an implementation
detail that should be hidden by the public API.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210616145901.29402-1-rf@opensource.cirrus.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include/linux/soundwire')
-rw-r--r-- | include/linux/soundwire/sdw.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index 8ca736e92d5a..ddbeb00799e4 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -1039,7 +1039,7 @@ int sdw_write(struct sdw_slave *slave, u32 addr, u8 value); int sdw_write_no_pm(struct sdw_slave *slave, u32 addr, u8 value); int sdw_read_no_pm(struct sdw_slave *slave, u32 addr); int sdw_nread(struct sdw_slave *slave, u32 addr, size_t count, u8 *val); -int sdw_nwrite(struct sdw_slave *slave, u32 addr, size_t count, u8 *val); +int sdw_nwrite(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val); int sdw_compare_devid(struct sdw_slave *slave, struct sdw_slave_id id); void sdw_extract_slave_id(struct sdw_bus *bus, u64 addr, struct sdw_slave_id *id); |