Get ParentDevicePath by using attribute EFI_OPEN_PROTOCOL_GET_PROTOCOL instead of BY_CHILD.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14313 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
sfu5
2013-04-25 01:18:58 +00:00
parent f07268bd0f
commit bf1400b9ad
2 changed files with 4 additions and 24 deletions

View File

@@ -1,7 +1,7 @@
/** @file
The driver binding and service binding protocol for the TCP driver.
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -717,7 +717,7 @@ TcpCreateSocketCallback (
(VOID **) &This->ParentDevicePath,
TcpServiceData->DriverBindingHandle,
This->SockHandle,
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
EFI_OPEN_PROTOCOL_GET_PROTOCOL
);
if (EFI_ERROR (Status)) {
gBS->CloseProtocol (
@@ -765,16 +765,6 @@ TcpDestroySocketCallback (
//
RemoveEntryList (&This->Link);
//
// Close the device path protocol
//
gBS->CloseProtocol (
TcpServiceData->ControllerHandle,
&gEfiDevicePathProtocolGuid,
TcpServiceData->DriverBindingHandle,
This->SockHandle
);
//
// Close the IP protocol.
//