]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
ArmPlatformPkg: Fix various typos
[mirror_edk2.git] / ArmPlatformPkg / Drivers / NorFlashDxe / NorFlashDxe.c
index 53753a4721ac980f202e690b596a1ad31e7250c6..d9e196cbf18c32fe5306cc3c0674a7b5798a9191 100644 (file)
@@ -2,13 +2,7 @@
 \r
   Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>\r
 \r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The 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
@@ -89,6 +83,7 @@ NOR_FLASH_INSTANCE  mNorFlashInstanceTemplate = {
       },\r
       { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } }, // GUID ... NEED TO BE FILLED\r
     },\r
+    0, // Index\r
     {\r
       END_DEVICE_PATH_TYPE,\r
       END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
@@ -105,7 +100,6 @@ NorFlashCreateInstance (
   IN UINT32                 Index,\r
   IN UINT32                 BlockSize,\r
   IN BOOLEAN                SupportFvb,\r
-  IN CONST GUID             *NorFlashGuid,\r
   OUT NOR_FLASH_INSTANCE**  NorFlashInstance\r
   )\r
 {\r
@@ -128,7 +122,8 @@ NorFlashCreateInstance (
   Instance->Media.BlockSize = BlockSize;\r
   Instance->Media.LastBlock = (NorFlashSize / BlockSize)-1;\r
 \r
-  CopyGuid (&Instance->DevicePath.Vendor.Guid, NorFlashGuid);\r
+  CopyGuid (&Instance->DevicePath.Vendor.Guid, &gEfiCallerIdGuid);\r
+  Instance->DevicePath.Index = (UINT8)Index;\r
 \r
   Instance->ShadowBuffer = AllocateRuntimePool (BlockSize);;\r
   if (Instance->ShadowBuffer == NULL) {\r
@@ -1114,7 +1109,7 @@ NorFlashWriteSingleBlock (
   @retval EFI_SUCCESS           The data was read correctly from the device.\r
   @retval EFI_DEVICE_ERROR      The device reported an error while performing the read.\r
   @retval EFI_NO_MEDIA          There is no media in the device.\r
-  @retval EFI_MEDIA_CHNAGED     The MediaId does not matched the current device.\r
+  @retval EFI_MEDIA_CHANGED     The MediaId does not match the current device.\r
   @retval EFI_INVALID_PARAMETER The read request contains device addresses that are not\r
                                 valid for the device.\r
 \r
@@ -1159,7 +1154,7 @@ NorFlashDiskIoReadDisk (
   @retval EFI_WRITE_PROTECTED   The device can not be written to.\r
   @retval EFI_DEVICE_ERROR      The device reported an error while performing the write.\r
   @retval EFI_NO_MEDIA          There is no media in the device.\r
-  @retval EFI_MEDIA_CHNAGED     The MediaId does not matched the current device.\r
+  @retval EFI_MEDIA_CHANGED     The MediaId does not match the current device.\r
   @retval EFI_INVALID_PARAMETER The write request contains device addresses that are not\r
                                  valid for the device.\r
 \r
@@ -1314,7 +1309,6 @@ NorFlashInitialise (
       Index,\r
       NorFlashDevices[Index].BlockSize,\r
       ContainVariableStorage,\r
-      &NorFlashDevices[Index].Guid,\r
       &mNorFlashInstances[Index]\r
     );\r
     if (EFI_ERROR(Status)) {\r