soc: qcom: cmd-db: Make endian-agnostic
authorStephen Boyd <swboyd@chromium.org>
Thu, 19 Apr 2018 18:29:24 +0000 (11:29 -0700)
committerAndy Gross <andy.gross@linaro.org>
Fri, 25 May 2018 20:53:52 +0000 (15:53 -0500)
commit36b0aefdee6e203f3130d7444bf5103139ecbe25
tree324a316f2e0e4d11ae7f35bf11ccf74ebccce3e3
parent312416d9171a1460b7ed8d182b5b540c910ce80d
soc: qcom: cmd-db: Make endian-agnostic

This driver deals with memory that is stored in little-endian format.
Update the structures with the proper little-endian types and then
do the proper conversions when reading the fields. Note that we compare
the ids with a memcmp() because we already pad out the string 'id' field
to exactly 8 bytes with the strncpy() onto the stack.

Cc: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Cc: Lina Iyer <ilina@codeaurora.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Evan Green <evgreen@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
drivers/soc/qcom/cmd-db.c