summaryrefslogtreecommitdiffstats
path: root/FatPkg/EnhancedFatDxe/Init.c
diff options
context:
space:
mode:
authorQing Huang <qing.huang@intel.com>2010-05-07 03:31:16 +0000
committerJordan Justen <jordan.l.justen@intel.com>2016-04-06 23:22:43 -0700
commit5251cb9d68ab96da99e284a3b01aa645c3dc7ddb (patch)
treebf2701e067507cf276398a11b1e13a6e5b2b7bcb /FatPkg/EnhancedFatDxe/Init.c
parent6163cc98b61a914a2775aed34d90c4d25cc56777 (diff)
downloadedk2-5251cb9d68ab96da99e284a3b01aa645c3dc7ddb.tar.gz
edk2-5251cb9d68ab96da99e284a3b01aa645c3dc7ddb.tar.bz2
edk2-5251cb9d68ab96da99e284a3b01aa645c3dc7ddb.zip
Move lock to FAT driver binding start to prevent interrupt during hot plug event.
(based on FatPkg commit b449ca31443f754ed2e6998ca32f49547dabd615) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'FatPkg/EnhancedFatDxe/Init.c')
-rw-r--r--FatPkg/EnhancedFatDxe/Init.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/FatPkg/EnhancedFatDxe/Init.c b/FatPkg/EnhancedFatDxe/Init.c
index 5d86a83f4d..ee258cd2c4 100644
--- a/FatPkg/EnhancedFatDxe/Init.c
+++ b/FatPkg/EnhancedFatDxe/Init.c
@@ -51,8 +51,7 @@ Returns:
{
EFI_STATUS Status;
FAT_VOLUME *Volume;
- BOOLEAN LockedByMe;
- LockedByMe = FALSE;
+
//
// Allocate a volume structure
//
@@ -60,14 +59,7 @@ Returns:
if (Volume == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- //
- // Acquire the lock.
- // If caller has already acquired the lock, cannot lock it again.
- //
- Status = FatAcquireLockOrFail ();
- if (!EFI_ERROR (Status)) {
- LockedByMe = TRUE;
- }
+
//
// Initialize the structure
//
@@ -119,13 +111,6 @@ Returns:
Volume->Valid = TRUE;
Done:
- //
- // Unlock if locked by myself.
- //
- if (LockedByMe) {
- FatReleaseLock ();
- }
-
if (EFI_ERROR (Status)) {
FatFreeVolume (Volume);
}