summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/northbridge/amd/agesa/family12/dimmSpd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/northbridge/amd/agesa/family12/dimmSpd.c b/src/northbridge/amd/agesa/family12/dimmSpd.c
index 3ac4d7d638..e8ef02a5b7 100644
--- a/src/northbridge/amd/agesa/family12/dimmSpd.c
+++ b/src/northbridge/amd/agesa/family12/dimmSpd.c
@@ -27,14 +27,13 @@
*
***************************************************************************/
+#include <stdlib.h>
#include "Porting.h"
#include "AGESA.h"
#include "amdlib.h"
#include <northbridge/amd/agesa/dimmSpd.h>
-#define DIMENSION(array)(sizeof (array)/ sizeof (array [0]))
-
typedef struct _DIMM_INFO_SMBUS{
UINT8 SocketId;
UINT8 MemChannelId;
@@ -60,7 +59,7 @@ AmdMemoryReadSPD (
{
UINT8 SmBusAddress = 0;
UINTN Index;
- UINTN MaxSocket = DIMENSION (SpdAddrLookup);
+ UINTN MaxSocket = ARRAY_SIZE(SpdAddrLookup);
for (Index = 0; Index < MaxSocket; Index ++){
if ((SpdData->SocketId == SpdAddrLookup[Index].SocketId) &&
(SpdData->MemChannelId == SpdAddrLookup[Index].MemChannelId) &&