\r
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions\r
-of the BSD License which accompanies this distribution. The\r
-full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
return TRUE;\r
}\r
\r
-/**\r
- Unlink the memory block from the pool's list.\r
-\r
- @param Head The block list head of the memory's pool.\r
- @param BlockToUnlink The memory block to unlink.\r
-\r
-**/\r
-VOID\r
-UsbHcUnlinkMemBlock (\r
- IN USBHC_MEM_BLOCK *Head,\r
- IN USBHC_MEM_BLOCK *BlockToUnlink\r
- )\r
-{\r
- USBHC_MEM_BLOCK *Block;\r
-\r
- ASSERT ((Head != NULL) && (BlockToUnlink != NULL));\r
-\r
- for (Block = Head; Block != NULL; Block = Block->Next) {\r
- if (Block->Next == BlockToUnlink) {\r
- Block->Next = BlockToUnlink->Next;\r
- BlockToUnlink->Next = NULL;\r
- break;\r
- }\r
- }\r
-}\r
\r
/**\r
Initialize the memory management pool for the host controller.\r
\r
//\r
// Unlink all the memory blocks from the pool, then free them.\r
- // UsbHcUnlinkMemBlock can't be used to unlink and free the\r
- // first block.\r
//\r
for (Block = Pool->Head->Next; Block != NULL; Block = Block->Next) {\r
UsbHcFreeMemBlock (Ehc, Pool, Block);\r