[PATCH] mfd: rave-sp: Fix rave_sp_emulated_get_status()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/mfd/rave-sp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c
index 67f7d4c65..c6ad57d51 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;
 }
--
2.21.0

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux