From c46b07f0d7a826ea0bb5811dd49450c2497fb926 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 7 Dec 2013 14:48:06 +0100 Subject: exynos4210: Use macro ARRAY_SIZE where possible This improves readability and simplifies the code. Cc: Dmitry Solodkiy Cc: Evgeny Voevodin Cc: Igor Mitsyanko Cc: Maksim Kozlov Signed-off-by: Stefan Weil Reviewed-by: Peter Maydell Signed-off-by: Michael Tokarev --- hw/misc/exynos4210_pmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hw/misc') diff --git a/hw/misc/exynos4210_pmu.c b/hw/misc/exynos4210_pmu.c index cbf0795c0a..5ec14d1c86 100644 --- a/hw/misc/exynos4210_pmu.c +++ b/hw/misc/exynos4210_pmu.c @@ -383,8 +383,7 @@ static const Exynos4210PmuReg exynos4210_pmu_regs[] = { {"GPS_ALIVE_OPTION", GPS_ALIVE_OPTION, 0x00000001}, }; -#define PMU_NUM_OF_REGISTERS \ - (sizeof(exynos4210_pmu_regs) / sizeof(Exynos4210PmuReg)) +#define PMU_NUM_OF_REGISTERS ARRAY_SIZE(exynos4210_pmu_regs) #define TYPE_EXYNOS4210_PMU "exynos4210.pmu" #define EXYNOS4210_PMU(obj) \ -- cgit v1.2.1