Skip to content

Commit

Permalink
Use helper function ReadNoFence() to read instead
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewYangMSFT authored Jan 22, 2025
1 parent 8506513 commit 35a9f5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions serial/VirtualSerial2/queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ QueueProcessGetLineControl(
//
// Take a snapshot of the line control register variable
//
lineControlSnapshot = *lineControlRegister;
lineControlSnapshot = ReadNoFence((LONG *)lineControlRegister);

//
// Decode the word length
Expand Down Expand Up @@ -801,7 +801,7 @@ QueueProcessSetLineControl(
NTSTATUS status;
PDEVICE_CONTEXT deviceContext;
SERIAL_LINE_CONTROL lineControl = {0};
volatile ULONG* lineControlRegister;
ULONG *lineControlRegister;
UCHAR lineControlData = 0;
UCHAR lineControlStop = 0;
UCHAR lineControlParity = 0;
Expand Down Expand Up @@ -946,7 +946,7 @@ QueueProcessSetLineControl(
#endif
}

lineControlSnapshot = *lineControlRegister;
lineControlSnapshot = ReadNoFence((LONG *)lineControlRegister);

lineControlNew = (lineControlSnapshot & SERIAL_LCR_BREAK) |
(lineControlData | lineControlParity | lineControlStop);
Expand Down

0 comments on commit 35a9f5d

Please sign in to comment.