]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c
Add generic HPET Timer DXE Driver and support libraries
[mirror_edk2.git] / PcAtChipsetPkg / Library / SerialIoLib / SerialPortLib.c
index f0cdc4982f3ab72312b17b0b2b5ef19988f27ac1..6bf705312d88fd6f9624f954053575e1f7b21e3f 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
-  UART Serial Port library instance with empty functions.\r
+  UART Serial Port library functions\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
@@ -13,9 +13,8 @@
 **/\r
 \r
 #include <Base.h>\r
-\r
-#include <Library/SerialPortLib.h>\r
 #include <Library/IoLib.h>\r
+#include <Library/SerialPortLib.h>\r
 \r
 //---------------------------------------------\r
 // UART Register Offsets\r
@@ -138,7 +137,7 @@ SerialPortWrite (
 \r
   Result = NumberOfBytes;\r
 \r
-  while (NumberOfBytes--) {\r
+  while ((NumberOfBytes--) != 0) {\r
     //\r
     // Wait for the serail port to be ready.\r
     //\r
@@ -179,7 +178,7 @@ SerialPortRead (
 \r
   Result = NumberOfBytes;\r
 \r
-  while (NumberOfBytes--) {\r
+  while ((NumberOfBytes--) != 0) {\r
     //\r
     // Wait for the serail port to be ready.\r
     //\r