soundwire: bus: Make sdw_nwrite() data pointer argument const
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Wed, 16 Jun 2021 14:59:01 +0000 (15:59 +0100)
committerVinod Koul <vkoul@kernel.org>
Sun, 20 Jun 2021 11:16:14 +0000 (16:46 +0530)
commit031e668bc1ad7ccdbfb2b67b838bb6b7cc44ecf3
treeeccf1efb750b9d906302484dc9adac8f01fc354c
parent29a269c6f54825c643a5c35762a2829ba5be67f6
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>
drivers/soundwire/bus.c
include/linux/soundwire/sdw.h