Commit 34883ef2 authored by Paul Davey's avatar Paul Davey Committed by Manivannan Sadhasivam
Browse files

bus: mhi: Fix pm_state conversion to string



On big endian architectures the mhi debugfs files which report pm state
give "Invalid State" for all states.  This is caused by using
find_last_bit which takes an unsigned long* while the state is passed in
as an enum mhi_pm_state which will be of int size.

Fix by using __fls to pass the value of state instead of find_last_bit.

Fixes: a6e2e352 ("bus: mhi: core: Add support for PM state transitions")
Signed-off-by: default avatarPaul Davey <paul.davey@alliedtelesis.co.nz>
Reviewed-by: default avatarManivannan Sadhasivam <mani@kernel.org>
Reviewed-by: default avatarHemant Kumar <hemantk@codeaurora.org>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
parent a56610b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment