From 24c4b47829a16f0f335621b3dee1a437297068d0 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Tue, 5 Jul 2016 20:40:17 +0900 Subject: memory: samsung: exynos-srom: Fix wrong count of registers This patch fixes wrong count of array for SROM registers from probe function. Signed-off-by: Seung-Woo Kim Reviewed-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski --- drivers/memory/samsung/exynos-srom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/memory/samsung/exynos-srom.c b/drivers/memory/samsung/exynos-srom.c index 067f53324901..bf827a666694 100644 --- a/drivers/memory/samsung/exynos-srom.c +++ b/drivers/memory/samsung/exynos-srom.c @@ -134,7 +134,7 @@ static int exynos_srom_probe(struct platform_device *pdev) platform_set_drvdata(pdev, srom); srom->reg_offset = exynos_srom_alloc_reg_dump(exynos_srom_offsets, - sizeof(exynos_srom_offsets)); + ARRAY_SIZE(exynos_srom_offsets)); if (!srom->reg_offset) { iounmap(srom->reg_base); return -ENOMEM; -- cgit v1.2.3 From aec6341e2ac76ea8703642e83535f216b8866162 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Wed, 6 Jul 2016 09:03:46 +0200 Subject: soc: samsung: pmu: Constify arrays with PMU data Arrays storing values for Power Management Unit for given sleep mode can be made const. Signed-off-by: Krzysztof Kozlowski --- drivers/soc/samsung/exynos3250-pmu.c | 2 +- drivers/soc/samsung/exynos5420-pmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/samsung/exynos3250-pmu.c b/drivers/soc/samsung/exynos3250-pmu.c index 20b3ab8aa790..af2f54e14b83 100644 --- a/drivers/soc/samsung/exynos3250-pmu.c +++ b/drivers/soc/samsung/exynos3250-pmu.c @@ -14,7 +14,7 @@ #include "exynos-pmu.h" -static struct exynos_pmu_conf exynos3250_pmu_config[] = { +static const struct exynos_pmu_conf exynos3250_pmu_config[] = { /* { .offset = offset, .val = { AFTR, W-AFTR, SLEEP } */ { EXYNOS3_ARM_CORE0_SYS_PWR_REG, { 0x0, 0x0, 0x2} }, { EXYNOS3_DIS_IRQ_ARM_CORE0_LOCAL_SYS_PWR_REG, { 0x0, 0x0, 0x0} }, diff --git a/drivers/soc/samsung/exynos5420-pmu.c b/drivers/soc/samsung/exynos5420-pmu.c index b962fb6a5d22..3f2c64180ef8 100644 --- a/drivers/soc/samsung/exynos5420-pmu.c +++ b/drivers/soc/samsung/exynos5420-pmu.c @@ -17,7 +17,7 @@ #include "exynos-pmu.h" -static struct exynos_pmu_conf exynos5420_pmu_config[] = { +static const struct exynos_pmu_conf exynos5420_pmu_config[] = { /* { .offset = offset, .val = { AFTR, LPA, SLEEP } */ { EXYNOS5_ARM_CORE0_SYS_PWR_REG, { 0x0, 0x0, 0x0} }, { EXYNOS5_DIS_IRQ_ARM_CORE0_LOCAL_SYS_PWR_REG, { 0x0, 0x0, 0x0} }, -- cgit v1.2.3