From aa79b0b3799e95bc21e0df32a135cc5a4d749e4b Mon Sep 17 00:00:00 2001 From: jji4 Date: Wed, 3 Dec 2008 08:52:39 +0000 Subject: Global variables have been moved backward ahead of functions. Only a few cases were left due to its module structure. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6816 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c | 80 ---------------------------- MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h | 81 +++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 80 deletions(-) (limited to 'MdeModulePkg/Bus/Usb/UsbMouseDxe') diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c index 1e359d7543..15b8405da2 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c +++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c @@ -22,86 +22,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "UsbMouse.h" #include "MouseHid.h" -/** - The USB Mouse driver entry pointer. - - @param ImageHandle The driver image handle. - @param SystemTable The system table. - - @return EFI_SUCCESS The component name protocol is installed. - @return Others Failed to init the usb driver. - -**/ -EFI_STATUS -EFIAPI -USBMouseDriverBindingEntryPoint ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ); - -/** - Test to see if this driver supports ControllerHandle. Any ControllerHandle - that has UsbIoProtocol installed will be supported. - - @param This Protocol instance pointer. - @param Controller Handle of device to test. - @param RemainingDevicePath Not used. - - @retval EFI_SUCCESS This driver supports this device. - @retval EFI_UNSUPPORTED This driver does not support this device. - -**/ -EFI_STATUS -EFIAPI -USBMouseDriverBindingSupported ( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE Controller, - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath - ); - -/** - Starting the Usb Mouse Driver. - - @param This Protocol instance pointer. - @param Controller Handle of device to test - @param RemainingDevicePath Not used - - @retval EFI_SUCCESS This driver supports this device. - @retval EFI_UNSUPPORTED This driver does not support this device. - @retval EFI_DEVICE_ERROR This driver cannot be started due to device Error. - @retval EFI_OUT_OF_RESOURCES Can't allocate memory resources. - @retval EFI_ALREADY_STARTED Thios driver has been started. - -**/ -EFI_STATUS -EFIAPI -USBMouseDriverBindingStart ( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE Controller, - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath - ); - -/** - Stop this driver on ControllerHandle. Support stoping any child handles - created by this driver. - - @param This Protocol instance pointer. - @param Controller Handle of device to stop driver on. - @param NumberOfChildren Number of Children in the ChildHandleBuffer. - @param ChildHandleBuffer List of handles for the children we need to stop. - - @retval EFI_SUCCESS The controller or children are stopped. - @retval Other Failed to stop the driver. - -**/ -EFI_STATUS -EFIAPI -USBMouseDriverBindingStop ( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE Controller, - IN UINTN NumberOfChildren, - IN EFI_HANDLE *ChildHandleBuffer - ); EFI_GUID gEfiUsbMouseDriverGuid = { 0x290156b5, 0x6a05, 0x4ac0, {0xb8, 0x0, 0x51, 0x27, 0x55, 0xad, 0x14, 0x29} diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h index e1068a03a1..b8b3ed4b38 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h +++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h @@ -115,4 +115,85 @@ MouseReportStatusCode ( IN EFI_STATUS_CODE_VALUE Value ); +/** + The USB Mouse driver entry pointer. + + @param ImageHandle The driver image handle. + @param SystemTable The system table. + + @return EFI_SUCCESS The component name protocol is installed. + @return Others Failed to init the usb driver. + +**/ +EFI_STATUS +EFIAPI +USBMouseDriverBindingEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ); + +/** + Test to see if this driver supports ControllerHandle. Any ControllerHandle + that has UsbIoProtocol installed will be supported. + + @param This Protocol instance pointer. + @param Controller Handle of device to test. + @param RemainingDevicePath Not used. + + @retval EFI_SUCCESS This driver supports this device. + @retval EFI_UNSUPPORTED This driver does not support this device. + +**/ +EFI_STATUS +EFIAPI +USBMouseDriverBindingSupported ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE Controller, + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath + ); + +/** + Starting the Usb Mouse Driver. + + @param This Protocol instance pointer. + @param Controller Handle of device to test + @param RemainingDevicePath Not used + + @retval EFI_SUCCESS This driver supports this device. + @retval EFI_UNSUPPORTED This driver does not support this device. + @retval EFI_DEVICE_ERROR This driver cannot be started due to device Error. + @retval EFI_OUT_OF_RESOURCES Can't allocate memory resources. + @retval EFI_ALREADY_STARTED Thios driver has been started. + +**/ +EFI_STATUS +EFIAPI +USBMouseDriverBindingStart ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE Controller, + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath + ); + +/** + Stop this driver on ControllerHandle. Support stoping any child handles + created by this driver. + + @param This Protocol instance pointer. + @param Controller Handle of device to stop driver on. + @param NumberOfChildren Number of Children in the ChildHandleBuffer. + @param ChildHandleBuffer List of handles for the children we need to stop. + + @retval EFI_SUCCESS The controller or children are stopped. + @retval Other Failed to stop the driver. + +**/ +EFI_STATUS +EFIAPI +USBMouseDriverBindingStop ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE Controller, + IN UINTN NumberOfChildren, + IN EFI_HANDLE *ChildHandleBuffer + ); + #endif -- cgit v1.2.3