summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Ata/AtaBusDxe/ComponentName.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Bus/Ata/AtaBusDxe/ComponentName.c')
-rw-r--r--MdeModulePkg/Bus/Ata/AtaBusDxe/ComponentName.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/ComponentName.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/ComponentName.c
index bb219072fb..920e26cc75 100644
--- a/MdeModulePkg/Bus/Ata/AtaBusDxe/ComponentName.c
+++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/ComponentName.c
@@ -11,20 +11,19 @@
//
// Driver name table
//
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mAtaBusDriverNameTable[] = {
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mAtaBusDriverNameTable[] = {
{ "eng;en", L"ATA Bus Driver" },
- { NULL , NULL }
+ { NULL, NULL }
};
//
// Controller name table
//
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mAtaBusControllerNameTable[] = {
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mAtaBusControllerNameTable[] = {
{ "eng;en", L"ATA Controller" },
- { NULL , NULL }
+ { NULL, NULL }
};
-
//
// EFI Component Name Protocol
//
@@ -37,9 +36,9 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gAtaBusComponentName
//
// EFI Component Name 2 Protocol
//
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gAtaBusComponentName2 = {
- (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) AtaBusComponentNameGetDriverName,
- (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) AtaBusComponentNameGetControllerName,
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gAtaBusComponentName2 = {
+ (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)AtaBusComponentNameGetDriverName,
+ (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)AtaBusComponentNameGetControllerName,
"en"
};
@@ -99,7 +98,6 @@ AtaBusComponentNameGetDriverName (
);
}
-
/**
Retrieves a Unicode string that is the user readable name of the controller
that is being managed by a driver.
@@ -171,11 +169,11 @@ AtaBusComponentNameGetDriverName (
EFI_STATUS
EFIAPI
AtaBusComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
)
{
EFI_STATUS Status;
@@ -205,13 +203,14 @@ AtaBusComponentNameGetControllerName (
if (EFI_ERROR (Status)) {
return Status;
}
+
//
// Get the child context
//
Status = gBS->OpenProtocol (
ChildHandle,
&gEfiBlockIoProtocolGuid,
- (VOID **) &BlockIo,
+ (VOID **)&BlockIo,
gAtaBusDriverBinding.DriverBindingHandle,
ChildHandle,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
@@ -219,9 +218,11 @@ AtaBusComponentNameGetControllerName (
if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED;
}
- AtaDevice = ATA_DEVICE_FROM_BLOCK_IO (BlockIo);
- ControllerNameTable =AtaDevice->ControllerNameTable;
+
+ AtaDevice = ATA_DEVICE_FROM_BLOCK_IO (BlockIo);
+ ControllerNameTable = AtaDevice->ControllerNameTable;
}
+
return LookupUnicodeString2 (
Language,
This->SupportedLanguages,