diff mbox

[v3,1/6] ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable

Message ID 20171130004510.23887-2-lukma@denx.de (mailing list archive)
State New, archived
Headers show

Commit Message

Lukasz Majewski Nov. 30, 2017, 12:45 a.m. UTC
This commit cleans up the code by using dedicated macros instead of
full definitions.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
Changes for v2:
- None
Changes for v3:
- None
---
 arch/arm/mach-ep93xx/ts72xx.c | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

Comments

Hartley Sweeten Nov. 30, 2017, 4:59 p.m. UTC | #1
On Wednesday, November 29, 2017 5:45 PM, Lukasz Majewski wrote:
> This commit cleans up the code by using dedicated macros instead of full definitions.
>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

<snip>

> @@ -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),
>  };
 
Lukasz,

The chunk above is already cleaned up in linux-next by:

commit 97c3bca922468996c864917c9a8ea6a410233985
ARM: ep93xx: tidy up TS-72xx Watchdog resources

Can you please rebase this series against linux-next?

I'm reviewing the rest of the series now and will reply with any other issues.

Thanks,
Hartley
diff mbox

Patch

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 = {