]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/EhciDxe/ComponentName.c
MdeModulePkg: Apply uncrustify changes
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / EhciDxe / ComponentName.c
index 3181b9da5b0f0b178ace3552ceb93d4592418591..ee83af2789de2a86eab8ca9a2c5bfbc83756601a 100644 (file)
@@ -1,22 +1,14 @@
 /** @file\r
   UEFI Component Name(2) protocol implementation for EHCI driver.\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
-  \r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions\r
-of the BSD License which accompanies this distribution.  The\r
-full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 #include "Ehci.h"\r
 \r
-\r
 //\r
 // EFI Component Name Protocol\r
 //\r
@@ -29,19 +21,17 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL  gEhciComponentName =
 //\r
 // EFI Component Name 2 Protocol\r
 //\r
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gEhciComponentName2 = {\r
-  (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) EhciComponentNameGetDriverName,\r
-  (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) EhciComponentNameGetControllerName,\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL  gEhciComponentName2 = {\r
+  (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)EhciComponentNameGetDriverName,\r
+  (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)EhciComponentNameGetControllerName,\r
   "en"\r
 };\r
 \r
-\r
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mEhciDriverNameTable[] = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE  mEhciDriverNameTable[] = {\r
   { "eng;en", L"Usb Ehci Driver" },\r
-  { NULL , NULL }\r
+  { NULL,     NULL               }\r
 };\r
 \r
-\r
 /**\r
   Retrieves a Unicode string that is the user readable name of the driver.\r
 \r
@@ -169,16 +159,16 @@ EhciComponentNameGetDriverName (
 EFI_STATUS\r
 EFIAPI\r
 EhciComponentNameGetControllerName (\r
-  IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
-  IN  EFI_HANDLE                                      ControllerHandle,\r
-  IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
-  IN  CHAR8                                           *Language,\r
-  OUT CHAR16                                          **ControllerName\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   ControllerHandle,\r
+  IN  EFI_HANDLE                   ChildHandle        OPTIONAL,\r
+  IN  CHAR8                        *Language,\r
+  OUT CHAR16                       **ControllerName\r
   )\r
 {\r
-  EFI_STATUS           Status;\r
-  USB2_HC_DEV          *EhciDev;\r
-  EFI_USB2_HC_PROTOCOL *Usb2Hc;\r
+  EFI_STATUS            Status;\r
+  USB2_HC_DEV           *EhciDev;\r
+  EFI_USB2_HC_PROTOCOL  *Usb2Hc;\r
 \r
   //\r
   // This is a device driver, so ChildHandle must be NULL.\r
@@ -186,6 +176,7 @@ EhciComponentNameGetControllerName (
   if (ChildHandle != NULL) {\r
     return EFI_UNSUPPORTED;\r
   }\r
+\r
   //\r
   // Make sure this driver is currently managing ControllerHandle\r
   //\r
@@ -197,13 +188,14 @@ EhciComponentNameGetControllerName (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
+\r
   //\r
   // Get the device context\r
   //\r
   Status = gBS->OpenProtocol (\r
                   ControllerHandle,\r
                   &gEfiUsb2HcProtocolGuid,\r
-                  (VOID **) &Usb2Hc,\r
+                  (VOID **)&Usb2Hc,\r
                   gEhciDriverBinding.DriverBindingHandle,\r
                   ControllerHandle,\r
                   EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
@@ -221,5 +213,4 @@ EhciComponentNameGetControllerName (
            ControllerName,\r
            (BOOLEAN)(This == &gEhciComponentName)\r
            );\r
-\r
 }\r