]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c
Remove unnecessary use of FixedPcdxxx() functions and [FixedPcd] INF sections. These...
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Isa / IsaSerialDxe / Serial.c
index a5ee00049e297a2ae54c6aea25b88dad5d85d897..03dae25b2d5ad958312609c17e97197a49d5ad43 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Serial driver for standard UARTS on an ISA bus.\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation<BR>\r
 All rights reserved. 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
@@ -361,7 +361,7 @@ SerialControllerDriverStart (
 \r
     Status = EFI_ALREADY_STARTED;\r
     for (Index = 0; Index < EntryCount; Index++) {\r
-      if (OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) {\r
+      if ((OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) != 0) {\r
         Status = gBS->OpenProtocol (\r
                         OpenInfoBuffer[Index].ControllerHandle,\r
                         &gEfiSerialIoProtocolGuid,\r
@@ -385,18 +385,9 @@ SerialControllerDriverStart (
         break;\r
       }\r
     }\r
-    FreePool (OpenInfoBuffer);\r
 \r
-    if (Index < EntryCount) {\r
-      //\r
-      // If gEfiSerialIoProtocolGuid is opened by one child device, return\r
-      //\r
-      return Status;\r
-    }\r
-    //\r
-    // If gEfiSerialIoProtocolGuid is not opened by any child device,\r
-    // go further to create child device handle based on RemainingDevicePath\r
-    //\r
+    FreePool (OpenInfoBuffer);\r
+    return Status;\r
   }\r
 \r
   if (RemainingDevicePath != NULL) {\r
@@ -1126,7 +1117,7 @@ IsaSerialSetAttributes (
   // Check for default settings and fill in actual values.\r
   //\r
   if (BaudRate == 0) {\r
-    BaudRate = FixedPcdGet64 (PcdUartDefaultBaudRate);\r
+    BaudRate = PcdGet64 (PcdUartDefaultBaudRate);\r
   }\r
 \r
   if (ReceiveFifoDepth == 0) {\r
@@ -1138,15 +1129,15 @@ IsaSerialSetAttributes (
   }\r
 \r
   if (Parity == DefaultParity) {\r
-    Parity = (EFI_PARITY_TYPE)FixedPcdGet8 (PcdUartDefaultParity);\r
+    Parity = (EFI_PARITY_TYPE)PcdGet8 (PcdUartDefaultParity);\r
   }\r
 \r
   if (DataBits == 0) {\r
-    DataBits = FixedPcdGet8 (PcdUartDefaultDataBits);\r
+    DataBits = PcdGet8 (PcdUartDefaultDataBits);\r
   }\r
 \r
   if (StopBits == DefaultStopBits) {\r
-    StopBits = (EFI_STOP_BITS_TYPE) FixedPcdGet8 (PcdUartDefaultStopBits);\r
+    StopBits = (EFI_STOP_BITS_TYPE) PcdGet8 (PcdUartDefaultStopBits);\r
   }\r
   //\r
   // 5 and 6 data bits can not be verified on a 16550A UART\r