From 7856c3ee084bae42bdce280aab24bd85c8b5e2fd Mon Sep 17 00:00:00 2001 From: bcran Date: Fri, 26 Oct 2018 21:57:22 +0000 Subject: [PATCH] Simplify the EFI delay() function by calling BS->Stall() Differential Revision: https://reviews.freebsd.org/D16753 --- stand/efi/libefi/delay.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/stand/efi/libefi/delay.c b/stand/efi/libefi/delay.c index 723f681c5286..9eb123096636 100644 --- a/stand/efi/libefi/delay.c +++ b/stand/efi/libefi/delay.c @@ -33,15 +33,5 @@ __FBSDID("$FreeBSD$"); void delay(int usecs) { - static EFI_EVENT ev = 0; - UINTN junk; - - if (!ev) { - if (BS->CreateEvent(EVT_TIMER, TPL_APPLICATION, 0, 0, &ev) - != EFI_SUCCESS) - return; - } - - BS->SetTimer(ev, TimerRelative, usecs * 10); - BS->WaitForEvent(1, &ev, &junk); + BS->Stall(usecs); }