diff options
author | Stefan Weil <sw@weilnetz.de> | 2013-12-07 14:48:06 +0100 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2013-12-23 16:02:19 +0400 |
commit | c46b07f0d7a826ea0bb5811dd49450c2497fb926 (patch) | |
tree | 361283429b5688b89d36fab9581d36810d3892bc /hw/misc/exynos4210_pmu.c | |
parent | 5d70192bcb80a5355323a4736e0fb44d8e2b6743 (diff) |
exynos4210: Use macro ARRAY_SIZE where possible
This improves readability and simplifies the code.
Cc: Dmitry Solodkiy <d.solodkiy@samsung.com>
Cc: Evgeny Voevodin <e.voevodin@samsung.com>
Cc: Igor Mitsyanko <i.mitsyanko@gmail.com>
Cc: Maksim Kozlov <m.kozlov@samsung.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/misc/exynos4210_pmu.c')
-rw-r--r-- | hw/misc/exynos4210_pmu.c | 3 |
1 files changed, 1 insertions, 2 deletions
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) \ |