Skip to contentSkip to conversation

mfd: rave-sp: Fix rave_sp_emulated_get_status()

PATCH Applied Andrey Smirnov 2 participants 2 messages Mar 31, 2020 – Apr 1, 2020 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/mfd/rave-sp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/rave-sp.c +1 -1
index 67f7d4c65..c6ad57d51 100644
@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Applied
#1 lore raw
Quoted 8 lines · Andrey Smirnov

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.

---
 drivers/mfd/rave-sp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

Quoted 22 lines
drivers/mfd/rave-sp.c +1 -2
index 67f7d4c65..c6ad57d51 100644
@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox