[PATCH 11/17] arm/samsung: Change s3c_pm_run_res() to use System RAM type

Borislav Petkov bp at alien8.de
Tue Jan 26 12:57:27 PST 2016


From: Toshi Kani <toshi.kani at hpe.com>

Change s3c_pm_run_res() to check with IORESOURCE_SYSTEM_RAM, instead of
strcmp() with "System RAM", to walk through System RAM ranges in the
iomem table.

No functional change is made to the interface.

Reviewed-by: Krzysztof Kozlowski <k.kozlowski at samsung.com>
Signed-off-by: Toshi Kani <toshi.kani at hpe.com>
Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: Kukjin Kim <kgene at kernel.org>
Cc: linux-arch at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-mm <linux-mm at kvack.org>
Cc: linux-samsung-soc at vger.kernel.org
Link: http://lkml.kernel.org/r/1452020081-26534-11-git-send-email-toshi.kani@hpe.com
Signed-off-by: Borislav Petkov <bp at suse.de>
---
 arch/arm/plat-samsung/pm-check.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-samsung/pm-check.c b/arch/arm/plat-samsung/pm-check.c
index 04aff2c31b46..70f2f699bed3 100644
--- a/arch/arm/plat-samsung/pm-check.c
+++ b/arch/arm/plat-samsung/pm-check.c
@@ -53,8 +53,8 @@ static void s3c_pm_run_res(struct resource *ptr, run_fn_t fn, u32 *arg)
 		if (ptr->child != NULL)
 			s3c_pm_run_res(ptr->child, fn, arg);
 
-		if ((ptr->flags & IORESOURCE_MEM) &&
-		    strcmp(ptr->name, "System RAM") == 0) {
+		if ((ptr->flags & IORESOURCE_SYSTEM_RAM)
+				== IORESOURCE_SYSTEM_RAM) {
 			S3C_PMDBG("Found system RAM at %08lx..%08lx\n",
 				  (unsigned long)ptr->start,
 				  (unsigned long)ptr->end);
-- 
2.3.5




More information about the linux-arm-kernel mailing list