summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c
index 9e98973c03..4b17c5423c 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c
+++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c
@@ -1,7 +1,7 @@
/** @file
UEFI Component Name and Name2 protocol for Isa serial driver.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -14,7 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "Serial.h"
-#define SERIAL_PORT_NAME "ISA Serial Port # "
//
// EFI Component Name Protocol
//
@@ -45,6 +44,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIsaSerialDriverNameTable
}
};
+GLOBAL_REMOVE_IF_UNREFERENCED CHAR16 mSerialPortName[] = L"ISA Serial Port # ";
+
/**
Retrieves a Unicode string that is the user readable name of the driver.
@@ -242,22 +243,19 @@ AddName (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
{
- CHAR16 SerialPortName[sizeof (SERIAL_PORT_NAME)];
-
- StrCpy (SerialPortName, L"ISA Serial Port # ");
- SerialPortName[sizeof (SERIAL_PORT_NAME) - 2] = (CHAR16) (L'0' + (UINT8) IsaIo->ResourceList->Device.UID);
+ mSerialPortName[(sizeof (mSerialPortName) / 2) - 2] = (CHAR16) (L'0' + (UINT8) IsaIo->ResourceList->Device.UID);
AddUnicodeString2 (
"eng",
gIsaSerialComponentName.SupportedLanguages,
&SerialDevice->ControllerNameTable,
- (CHAR16 *) SerialPortName,
+ mSerialPortName,
TRUE
);
AddUnicodeString2 (
"en",
gIsaSerialComponentName2.SupportedLanguages,
&SerialDevice->ControllerNameTable,
- (CHAR16 *) SerialPortName,
+ mSerialPortName,
FALSE
);