summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2020-03-31 10:22:52 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2020-04-01 07:52:41 +0200
commit328dfaabb22fa9241c71731da81558c5e2a3925d (patch)
treebfe72862cce1d3adf70914e78ce24d6a4a2ed5b8 /drivers
parentc3bc808ddb01c014b8f56fd503e700c77849a2af (diff)
downloadbarebox-328dfaabb22fa9241c71731da81558c5e2a3925d.tar.gz
mfd: rave-sp: Fix rave_sp_emulated_get_status()
Original code in rave_sp_emulated_get_status() got the meaning of RAVE_SP_STATUS_GS_FIRMWARE_MODE wrong. Invert it to correctly detect if RAVE SP device is in bootloader mode or not. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/rave-sp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c
index 67f7d4c..c6ad57d 100644
--- a/drivers/mfd/rave-sp.c
+++ b/drivers/mfd/rave-sp.c
@@ -661,7 +661,7 @@ static int rave_sp_emulated_get_status(struct rave_sp *sp,
return ret;
status->general_status =
- firmware_mode ? RAVE_SP_STATUS_GS_FIRMWARE_MODE : 0;
+ firmware_mode ? 0 : RAVE_SP_STATUS_GS_FIRMWARE_MODE;
return 0;
}