summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c
diff options
context:
space:
mode:
Diffstat (limited to 'EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c')
-rw-r--r--EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c b/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c
index e6a5be480b..fef5de9387 100644
--- a/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c
+++ b/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c
@@ -608,17 +608,7 @@ BotCommandPhase (
cbw.dCBWSignature = CBWSIG;
cbw.dCBWTag = 0x01;
cbw.dCBWDataTransferLength = DataTransferLength;
- switch (Direction) {
- case EfiUsbDataOut:
- case EfiUsbNoData:
- cbw.bmCBWFlags = 0;
- break;
- case EfiUsbDataIn:
- cbw.bmCBWFlags = 0x80;
- break;
- default:
- break;
- }
+ cbw.bmCBWFlags = (UINT8) ((Direction == EfiUsbDataIn) ? 0x80 : 0);
cbw.bCBWCBLength = CommandSize;
CopyMem (cbw.CBWCB, Command, CommandSize);