Thread (80 messages) 80 messages, 5 authors, 2017-12-20
STALE3143d
Revisions (5)
  1. v1 [diff vs current]
  2. v2 current
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]

[PATCH v2 1/6] ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable

From: lukma@denx.de (Lukasz Majewski)
Date: 2017-11-21 14:32:30
Also in: lkml
Subsystem: arm port, arm/cirrus logic bk3 machine support, arm/cirrus logic ep93xx arm architecture, the rest · Maintainers: Russell King, Lukasz Majewski, Hartley Sweeten, Alexander Sverdlin, Nikita Shubin, Linus Torvalds

This commit cleans up the code by using dedicated macros instead of
full definitions.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
Changes for v2:
- None
---
 arch/arm/mach-ep93xx/ts72xx.c | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 8745162ec05d..06345b85f27c 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -187,16 +187,8 @@ static struct platform_device ts72xx_rtc_device = {
 };
 
 static struct resource ts72xx_wdt_resources[] = {
-	{
-		.start	= TS72XX_WDT_CONTROL_PHYS_BASE,
-		.end	= TS72XX_WDT_CONTROL_PHYS_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	{
-		.start	= TS72XX_WDT_FEED_PHYS_BASE,
-		.end	= TS72XX_WDT_FEED_PHYS_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
+	DEFINE_RES_MEM(TS72XX_WDT_CONTROL_PHYS_BASE, SZ_4K),
+	DEFINE_RES_MEM(TS72XX_WDT_FEED_PHYS_BASE, SZ_4K),
 };
 
 static struct platform_device ts72xx_wdt_device = {
@@ -216,11 +208,7 @@ static struct ep93xx_eth_data __initdata ts72xx_eth_data = {
 #define TS73XX_FPGA_LOADER_BASE		0x03c00000
 
 static struct resource ts73xx_fpga_resources[] = {
-	{
-		.start	= EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE,
-		.end	= EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE + 1,
-		.flags	= IORESOURCE_MEM,
-	},
+	DEFINE_RES_MEM(EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE, 0x01),
 };
 
 static struct platform_device ts73xx_fpga_device = {
-- 
2.11.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help