/** @file\r
UEFI Component Name and Name2 protocol for Isa serial driver.\r
\r
-Copyright (c) 2006 - 2009, Intel Corporation.<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2015, 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
\r
#include "Serial.h"\r
\r
-#define SERIAL_PORT_NAME "ISA Serial Port # "\r
//\r
// EFI Component Name Protocol\r
//\r
}\r
};\r
\r
+GLOBAL_REMOVE_IF_UNREFERENCED CHAR16 mSerialPortName[] = L"ISA Serial Port # ";\r
+\r
/**\r
Retrieves a Unicode string that is the user readable name of the driver.\r
\r
driver specified by This was returned in\r
DriverName.\r
\r
- @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+ @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
\r
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
EFI_HANDLE.\r
IN EFI_ISA_IO_PROTOCOL *IsaIo\r
)\r
{\r
- CHAR16 SerialPortName[sizeof (SERIAL_PORT_NAME)];\r
-\r
- StrCpy (SerialPortName, L"ISA Serial Port # ");\r
- SerialPortName[sizeof (SERIAL_PORT_NAME) - 2] = (CHAR16) (L'0' + (UINT8) IsaIo->ResourceList->Device.UID);\r
+ mSerialPortName[(sizeof (mSerialPortName) / 2) - 2] = (CHAR16) (L'0' + (UINT8) IsaIo->ResourceList->Device.UID);\r
AddUnicodeString2 (\r
"eng",\r
gIsaSerialComponentName.SupportedLanguages,\r
&SerialDevice->ControllerNameTable,\r
- (CHAR16 *) SerialPortName,\r
+ mSerialPortName,\r
TRUE\r
);\r
AddUnicodeString2 (\r
"en",\r
gIsaSerialComponentName2.SupportedLanguages,\r
&SerialDevice->ControllerNameTable,\r
- (CHAR16 *) SerialPortName,\r
+ mSerialPortName,\r
FALSE\r
);\r
\r