soundwire: qcom: cleanup internal port config indexing
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Thu, 1 Apr 2021 09:24:54 +0000 (10:24 +0100)
committerVinod Koul <vkoul@kernel.org>
Tue, 6 Apr 2021 04:53:59 +0000 (10:23 +0530)
commit9916c02ccd74e672b62dd1a9017ac2f237ebf512
treed10be825c090603cc30d62ac92cc0ada5eaa27f8
parenta661308c34de8cbd22165edf63dbd24ccb914981
soundwire: qcom: cleanup internal port config indexing

Internally used portconfig array for storing port bandwidth
params starts from offset zero. However port zero is not really
used and we also copy the bus parameters to offset zero.
So basically we endup with a code which has to subtract 1 from port
number to get to port parameters.

This is bit confusing to the reader so, make this bit more obvious by only
copying the parameters to offset 1 instead of zero. This will avoid doing
-1 every time when we try to get port params.

Similar thing has been recently done with din/dout_port_mask.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210401092454.21299-1-srinivas.kandagatla@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/qcom.c