delete a debug output to pass through EBC build and align some line to conform with code style

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4315 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2007-11-21 03:44:19 +00:00
parent fba96322cc
commit f74cc0260b
1 changed files with 58 additions and 58 deletions

View File

@ -282,6 +282,7 @@ USBMouseSimulateTouchPadDriverBindingStart (
UsbMouseSimulateTouchPadDevice->Signature = USB_MOUSE_SIMULATE_TOUCHPAD_DEV_SIGNATURE; UsbMouseSimulateTouchPadDevice->Signature = USB_MOUSE_SIMULATE_TOUCHPAD_DEV_SIGNATURE;
UsbMouseSimulateTouchPadDevice->InterfaceDescriptor = AllocatePool (sizeof (EFI_USB_INTERFACE_DESCRIPTOR)); UsbMouseSimulateTouchPadDevice->InterfaceDescriptor = AllocatePool (sizeof (EFI_USB_INTERFACE_DESCRIPTOR));
if (UsbMouseSimulateTouchPadDevice->InterfaceDescriptor == NULL) { if (UsbMouseSimulateTouchPadDevice->InterfaceDescriptor == NULL) {
Status = EFI_OUT_OF_RESOURCES; Status = EFI_OUT_OF_RESOURCES;
goto ErrorExit; goto ErrorExit;
@ -352,32 +353,32 @@ USBMouseSimulateTouchPadDriverBindingStart (
goto ErrorExit; goto ErrorExit;
} }
UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol.GetState = GetMouseSimulateTouchPadState; UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol.GetState = GetMouseSimulateTouchPadState;
UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol.Reset = UsbMouseSimulateTouchPadReset; UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol.Reset = UsbMouseSimulateTouchPadReset;
UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol.Mode = &UsbMouseSimulateTouchPadDevice->AbsolutePointerMode; UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol.Mode = &UsbMouseSimulateTouchPadDevice->AbsolutePointerMode;
Status = gBS->CreateEvent ( Status = gBS->CreateEvent (
EVT_NOTIFY_WAIT, EVT_NOTIFY_WAIT,
TPL_NOTIFY, TPL_NOTIFY,
UsbMouseSimulateTouchPadWaitForInput, UsbMouseSimulateTouchPadWaitForInput,
UsbMouseSimulateTouchPadDevice, UsbMouseSimulateTouchPadDevice,
&((UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol).WaitForInput) &((UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol).WaitForInput)
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
goto ErrorExit; goto ErrorExit;
} }
Status = gBS->InstallProtocolInterface ( Status = gBS->InstallProtocolInterface (
&Controller, &Controller,
&gEfiAbsolutePointerProtocolGuid, &gEfiAbsolutePointerProtocolGuid,
EFI_NATIVE_INTERFACE, EFI_NATIVE_INTERFACE,
&UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol &UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
Status = EFI_DEVICE_ERROR; Status = EFI_DEVICE_ERROR;
goto ErrorExit; goto ErrorExit;
} }
// //
// After Enabling Async Interrupt Transfer on this mouse Device // After Enabling Async Interrupt Transfer on this mouse Device
@ -435,13 +436,12 @@ USBMouseSimulateTouchPadDriverBindingStart (
Status = EFI_DEVICE_ERROR; Status = EFI_DEVICE_ERROR;
gBS->UninstallProtocolInterface ( gBS->UninstallProtocolInterface (
Controller, Controller,
&gEfiAbsolutePointerProtocolGuid, &gEfiAbsolutePointerProtocolGuid,
&UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol &UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol
); );
ErrorExit: ErrorExit:
DEBUG ((EFI_D_ERROR, __FUNCTION__ " driver start fail\n"));
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
gBS->CloseProtocol ( gBS->CloseProtocol (
Controller, Controller,
@ -459,9 +459,9 @@ ErrorExit:
gBS->FreePool (UsbMouseSimulateTouchPadDevice->IntEndpointDescriptor); gBS->FreePool (UsbMouseSimulateTouchPadDevice->IntEndpointDescriptor);
} }
if ((UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol).WaitForInput != NULL) { if ((UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol).WaitForInput != NULL) {
gBS->CloseEvent ((UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol).WaitForInput); gBS->CloseEvent ((UsbMouseSimulateTouchPadDevice->AbsolutePointerProtocol).WaitForInput);
} }
gBS->FreePool (UsbMouseSimulateTouchPadDevice); gBS->FreePool (UsbMouseSimulateTouchPadDevice);
UsbMouseSimulateTouchPadDevice = NULL; UsbMouseSimulateTouchPadDevice = NULL;
@ -503,18 +503,18 @@ USBMouseSimulateTouchPadDriverBindingStop (
// //
// Get our context back. // Get our context back.
// //
Status = gBS->OpenProtocol ( Status = gBS->OpenProtocol (
Controller, Controller,
&gEfiAbsolutePointerProtocolGuid, &gEfiAbsolutePointerProtocolGuid,
(VOID **) &AbsolutePointerProtocol, (VOID **) &AbsolutePointerProtocol,
This->DriverBindingHandle, This->DriverBindingHandle,
Controller, Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL EFI_OPEN_PROTOCOL_GET_PROTOCOL
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
UsbMouseSimulateTouchPadDevice = USB_MOUSE_SIMULATE_TOUCHPAD_DEV_FROM_MOUSE_PROTOCOL (AbsolutePointerProtocol); UsbMouseSimulateTouchPadDevice = USB_MOUSE_SIMULATE_TOUCHPAD_DEV_FROM_MOUSE_PROTOCOL (AbsolutePointerProtocol);
gBS->CloseProtocol ( gBS->CloseProtocol (
@ -703,13 +703,13 @@ InitializeUsbMouseSimulateTouchPadDevice (
return Status; return Status;
} }
UsbMouseSimulateTouchPadDev->AbsolutePointerMode.AbsoluteMaxX = 1024; UsbMouseSimulateTouchPadDev->AbsolutePointerMode.AbsoluteMaxX = 1024;
UsbMouseSimulateTouchPadDev->AbsolutePointerMode.AbsoluteMaxY = 1024; UsbMouseSimulateTouchPadDev->AbsolutePointerMode.AbsoluteMaxY = 1024;
UsbMouseSimulateTouchPadDev->AbsolutePointerMode.AbsoluteMaxZ = 0; UsbMouseSimulateTouchPadDev->AbsolutePointerMode.AbsoluteMaxZ = 0;
UsbMouseSimulateTouchPadDev->AbsolutePointerMode.AbsoluteMinX = 0; UsbMouseSimulateTouchPadDev->AbsolutePointerMode.AbsoluteMinX = 0;
UsbMouseSimulateTouchPadDev->AbsolutePointerMode.AbsoluteMinY = 0; UsbMouseSimulateTouchPadDev->AbsolutePointerMode.AbsoluteMinY = 0;
UsbMouseSimulateTouchPadDev->AbsolutePointerMode.AbsoluteMinZ = 0; UsbMouseSimulateTouchPadDev->AbsolutePointerMode.AbsoluteMinZ = 0;
UsbMouseSimulateTouchPadDev->AbsolutePointerMode.Attributes = 0x3; UsbMouseSimulateTouchPadDev->AbsolutePointerMode.Attributes = 0x3;
// //
// Here we just assume interface 0 is the mouse interface // Here we just assume interface 0 is the mouse interface
@ -835,16 +835,16 @@ OnMouseSimulateTouchPadInterruptComplete (
return EFI_SUCCESS; return EFI_SUCCESS;
} }
// //
//Check mouse Data //Check mouse Data
// //
UsbMouseSimulateTouchPadDevice->AbsolutePointerStateChanged = TRUE; UsbMouseSimulateTouchPadDevice->AbsolutePointerStateChanged = TRUE;
UsbMouseSimulateTouchPadDevice->AbsolutePointerState.CurrentX += *((INT8 *) Data + 1); UsbMouseSimulateTouchPadDevice->AbsolutePointerState.CurrentX += *((INT8 *) Data + 1);
UsbMouseSimulateTouchPadDevice->AbsolutePointerState.CurrentY += *((INT8 *) Data + 2); UsbMouseSimulateTouchPadDevice->AbsolutePointerState.CurrentY += *((INT8 *) Data + 2);
if (DataLength > 3) { if (DataLength > 3) {
UsbMouseSimulateTouchPadDevice->AbsolutePointerState.CurrentZ += *((INT8 *) Data + 3); UsbMouseSimulateTouchPadDevice->AbsolutePointerState.CurrentZ += *((INT8 *) Data + 3);
} }
UsbMouseSimulateTouchPadDevice->AbsolutePointerState.ActiveButtons = *(UINT8 *)Data & 0x3; UsbMouseSimulateTouchPadDevice->AbsolutePointerState.ActiveButtons = *(UINT8 *)Data & 0x3;
return EFI_SUCCESS; return EFI_SUCCESS;
} }