From 355752066c0e4383406e42796d00a91fcd74b36f Mon Sep 17 00:00:00 2001 From: vit9696 Date: Mon, 13 Jan 2020 00:27:05 +0300 Subject: [PATCH] OpenCoreUefi: Simplify connect all code --- Platform/OpenCore/OpenCoreUefi.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/Platform/OpenCore/OpenCoreUefi.c b/Platform/OpenCore/OpenCoreUefi.c index f4e8b0ad028..9e55f257e75 100644 --- a/Platform/OpenCore/OpenCoreUefi.c +++ b/Platform/OpenCore/OpenCoreUefi.c @@ -156,11 +156,10 @@ OcConnectDrivers ( UINTN HandleCount; EFI_HANDLE *HandleBuffer; UINTN Index; - VOID *DriverBinding; Status = gBS->LocateHandleBuffer ( - AllHandles, - NULL, + ByProtocol, + &gEfiDevicePathProtocolGuid, NULL, &HandleCount, &HandleBuffer @@ -170,19 +169,6 @@ OcConnectDrivers ( } for (Index = 0; Index < HandleCount; ++Index) { - Status = gBS->HandleProtocol ( - HandleBuffer[Index], - &gEfiDevicePathProtocolGuid, - &DriverBinding - ); - - if (EFI_ERROR (Status)) { - // - // Calling ConnectController on non-driver results in freezes on APTIO IV. - // - continue; - } - gBS->ConnectController (HandleBuffer[Index], NULL, NULL, TRUE); }