ISA Bus code scrub.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8538 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
rsun3 2009-06-12 08:18:57 +00:00
parent 1b954bea09
commit f423cbf1e9
5 changed files with 9 additions and 12 deletions

View File

@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#include "ComponentName.h" #include "InternalIsaBus.h"
// //
// EFI Component Name Protocol // EFI Component Name Protocol

View File

@ -15,8 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef _COMPONENT_NAME_H_ #ifndef _COMPONENT_NAME_H_
#define _COMPONENT_NAME_H_ #define _COMPONENT_NAME_H_
#include "InternalIsaBus.h"
extern EFI_COMPONENT_NAME_PROTOCOL gIsaBusComponentName; extern EFI_COMPONENT_NAME_PROTOCOL gIsaBusComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gIsaBusComponentName2; extern EFI_COMPONENT_NAME2_PROTOCOL gIsaBusComponentName2;

View File

@ -16,8 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define _INTERNAL_ISA_BUS_H_ #define _INTERNAL_ISA_BUS_H_
#include <PiDxe.h> #include <Uefi.h>
#include <FrameworkDxe.h>
#include <Protocol/PciIo.h> #include <Protocol/PciIo.h>
#include <Protocol/ComponentName.h> #include <Protocol/ComponentName.h>

View File

@ -522,8 +522,8 @@ IsaBusControllerDriverStop (
); );
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
gBS->FreePool (IsaIoDevice->DevicePath); FreePool (IsaIoDevice->DevicePath);
gBS->FreePool (IsaIoDevice); FreePool (IsaIoDevice);
} else { } else {
// //
// Re-open PCI IO Protocol on behalf of the child device // Re-open PCI IO Protocol on behalf of the child device
@ -660,10 +660,10 @@ Done:
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
if (IsaIoDevice->DevicePath != NULL) { if (IsaIoDevice->DevicePath != NULL) {
gBS->FreePool (IsaIoDevice->DevicePath); FreePool (IsaIoDevice->DevicePath);
} }
gBS->FreePool (IsaIoDevice); FreePool (IsaIoDevice);
} }
return Status; return Status;

View File

@ -387,7 +387,7 @@ IsaIoUnmap (
// Free the mapped buffer and the MAP_INFO structure. // Free the mapped buffer and the MAP_INFO structure.
// //
gBS->FreePages (IsaMapInfo->MappedHostAddress, IsaMapInfo->NumberOfPages); gBS->FreePages (IsaMapInfo->MappedHostAddress, IsaMapInfo->NumberOfPages);
gBS->FreePool (IsaMapInfo); FreePool (IsaMapInfo);
} }
return EFI_SUCCESS; return EFI_SUCCESS;
@ -822,7 +822,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
&IsaMapInfo->MappedHostAddress &IsaMapInfo->MappedHostAddress
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
gBS->FreePool (IsaMapInfo); FreePool (IsaMapInfo);
*NumberOfBytes = 0; *NumberOfBytes = 0;
*Mapping = NULL; *Mapping = NULL;
return Status; return Status;
@ -1129,7 +1129,7 @@ IsaIoMapFullSupport (
&IsaMapInfo->MappedHostAddress &IsaMapInfo->MappedHostAddress
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
gBS->FreePool (IsaMapInfo); FreePool (IsaMapInfo);
*NumberOfBytes = 0; *NumberOfBytes = 0;
*Mapping = NULL; *Mapping = NULL;
return Status; return Status;