+ }\r
+ }\r
+ //\r
+ // Uninstall the Console Device GUIDs from Controller Handle\r
+ //\r
+ ConPlatformUnInstallProtocol (\r
+ This,\r
+ ControllerHandle,\r
+ &gEfiConsoleInDeviceGuid\r
+ );\r
+\r
+ //\r
+ // Close the Simple Input Protocol\r
+ //\r
+ gBS->CloseProtocol (\r
+ ControllerHandle,\r
+ &gEfiSimpleTextInProtocolGuid,\r
+ This->DriverBindingHandle,\r
+ ControllerHandle\r
+ );\r
+\r
+ return EFI_SUCCESS;\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformTextOutDriverBindingStop (\r
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
+ IN EFI_HANDLE ControllerHandle,\r
+ IN UINTN NumberOfChildren,\r
+ IN EFI_HANDLE *ChildHandleBuffer\r
+ )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+Arguments:\r
+ (Standard DriverBinding Protocol Stop() function)\r
+\r
+Returns:\r
+\r
+ None\r
+\r
+--*/\r
+{\r
+ EFI_STATUS Status;\r
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
+\r
+ //\r
+ // hot plug device is not included into the console associated variables,\r
+ // so no need to check variable for those hot plug devices.\r
+ //\r
+ if (!IsHotPlugDevice (This->DriverBindingHandle, ControllerHandle)) {\r
+ //\r
+ // Get the Device Path Protocol so the environment variables can be updated\r
+ //\r
+ Status = gBS->OpenProtocol (\r
+ ControllerHandle,\r
+ &gEfiDevicePathProtocolGuid,\r
+ (VOID **) &DevicePath,\r
+ This->DriverBindingHandle,\r
+ ControllerHandle,\r
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
+ );\r
+ if (!EFI_ERROR (Status)) {\r
+ //\r
+ // Remove DevicePath from ConOutDev, and StdErrDev\r
+ //\r