exynos4210_cmu: Fix size of registers array
authorMaksim Kozlov <m.kozlov@samsung.com>
Tue, 26 Jun 2012 16:50:40 +0000 (20:50 +0400)
committerEvgeny Voevodin <e.voevodin@samsung.com>
Fri, 6 Jul 2012 07:57:15 +0000 (11:57 +0400)
hw/exynos4210_cmu.c

index 1ea9d7a3ba306c6c8cfd53d24d95b9841b8118e4..0a887ecef1254833a1d7b1e3b70912e7f66cf9c2 100644 (file)
@@ -527,7 +527,7 @@ typedef struct {
         MemoryRegion iomem;
 
         /* registers values */
-        uint32_t reg[EXYNOS4210_CMU_REGS_MEM_SIZE];
+        uint32_t reg[EXYNOS4210_CMU_REGS_MEM_SIZE / sizeof(uint32_t)];
 
         /* which CMU it is */
         Exynos4210Cmu cmu_id;
@@ -1360,7 +1360,7 @@ static const VMStateDescription vmstate_exynos4210_cmu = {
          * TODO: Maybe we should save Exynos4210ClockState structs as well
          */
             VMSTATE_UINT32_ARRAY(reg, Exynos4210CmuState,
-                                 EXYNOS4210_CMU_REGS_MEM_SIZE),
+                              EXYNOS4210_CMU_REGS_MEM_SIZE / sizeof(uint32_t)),
             VMSTATE_END_OF_LIST()
         }
 };