summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/ComponentName.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/ComponentName.c')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/ComponentName.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/ComponentName.c b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/ComponentName.c
index efad274fd9..6c861d5257 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/ComponentName.c
+++ b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/ComponentName.c
@@ -6,7 +6,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
-
#include "UsbMouseAbsolutePointer.h"
//
@@ -21,16 +20,15 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gUsbMouseAbsolutePoin
//
// EFI Component Name 2 Protocol
//
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gUsbMouseAbsolutePointerComponentName2 = {
- (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) UsbMouseAbsolutePointerComponentNameGetDriverName,
- (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) UsbMouseAbsolutePointerComponentNameGetControllerName,
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gUsbMouseAbsolutePointerComponentName2 = {
+ (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)UsbMouseAbsolutePointerComponentNameGetDriverName,
+ (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)UsbMouseAbsolutePointerComponentNameGetControllerName,
"en"
};
-
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUsbMouseAbsolutePointerDriverNameTable[] = {
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUsbMouseAbsolutePointerDriverNameTable[] = {
{ "eng;en", L"Usb Mouse Absolute Pointer Driver" },
- { NULL , NULL }
+ { NULL, NULL }
};
/**
@@ -145,17 +143,17 @@ UsbMouseAbsolutePointerComponentNameGetDriverName (
EFI_STATUS
EFIAPI
UsbMouseAbsolutePointerComponentNameGetControllerName (
- 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;
- USB_MOUSE_ABSOLUTE_POINTER_DEV *UsbMouseAbsolutePointerDev;
- EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointerProtocol;
- EFI_USB_IO_PROTOCOL *UsbIoProtocol;
+ EFI_STATUS Status;
+ USB_MOUSE_ABSOLUTE_POINTER_DEV *UsbMouseAbsolutePointerDev;
+ EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointerProtocol;
+ EFI_USB_IO_PROTOCOL *UsbIoProtocol;
//
// This is a device driver, so ChildHandle must be NULL.
@@ -170,7 +168,7 @@ UsbMouseAbsolutePointerComponentNameGetControllerName (
Status = gBS->OpenProtocol (
ControllerHandle,
&gEfiUsbIoProtocolGuid,
- (VOID **) &UsbIoProtocol,
+ (VOID **)&UsbIoProtocol,
gUsbMouseAbsolutePointerDriverBinding.DriverBindingHandle,
ControllerHandle,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -189,13 +187,14 @@ UsbMouseAbsolutePointerComponentNameGetControllerName (
if (Status != EFI_ALREADY_STARTED) {
return EFI_UNSUPPORTED;
}
+
//
// Get the device context
//
Status = gBS->OpenProtocol (
ControllerHandle,
- &gEfiAbsolutePointerProtocolGuid,
- (VOID **) &AbsolutePointerProtocol,
+ &gEfiAbsolutePointerProtocolGuid,
+ (VOID **)&AbsolutePointerProtocol,
gUsbMouseAbsolutePointerDriverBinding.DriverBindingHandle,
ControllerHandle,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
@@ -214,5 +213,4 @@ UsbMouseAbsolutePointerComponentNameGetControllerName (
ControllerName,
(BOOLEAN)(This == &gUsbMouseAbsolutePointerComponentName)
);
-
}