Skip to content

Commit

Permalink
OpenCoreUefi: Simplify connect all code
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Jan 12, 2020
1 parent ac7b337 commit 3557520
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions Platform/OpenCore/OpenCoreUefi.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,10 @@ OcConnectDrivers (
UINTN HandleCount;
EFI_HANDLE *HandleBuffer;
UINTN Index;
VOID *DriverBinding;

Status = gBS->LocateHandleBuffer (
AllHandles,
NULL,
ByProtocol,
&gEfiDevicePathProtocolGuid,
NULL,
&HandleCount,
&HandleBuffer
Expand All @@ -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);
}

Expand Down

0 comments on commit 3557520

Please # to comment.