]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: orion5x: ts78xx fix NAND resource off by one
authorAlexander Clouter <alex@digriz.org.uk>
Sat, 12 May 2012 14:16:59 +0000 (15:16 +0100)
committerAndrew Lunn <andrew@lunn.ch>
Mon, 14 May 2012 16:13:02 +0000 (18:13 +0200)
Changelog:
 v2: use DEFINE_RES_MEM as suggesed by Hartley Sweeten
 v1: inital release

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
arch/arm/mach-orion5x/ts78xx-setup.c

index c41f27bd7184020063af7bbdb8db0e267693d5c6..d8670cbae77078f67f63ca55d6eb36567ec44584 100644 (file)
@@ -292,11 +292,8 @@ static struct platform_nand_data ts78xx_ts_nand_data = {
        },
 };
 
-static struct resource ts78xx_ts_nand_resources = {
-       .start          = TS_NAND_DATA,
-       .end            = TS_NAND_DATA + 4,
-       .flags          = IORESOURCE_MEM,
-};
+static struct resource ts78xx_ts_nand_resources
+                       = DEFINE_RES_MEM(TS_NAND_DATA, 4);
 
 static struct platform_device ts78xx_ts_nand_device = {
        .name           = "gen_nand",
@@ -332,11 +329,8 @@ static void ts78xx_ts_nand_unload(void)
  ****************************************************************************/
 #define TS_RNG_DATA    (TS78XX_FPGA_REGS_PHYS_BASE | 0x044)
 
-static struct resource ts78xx_ts_rng_resource = {
-       .flags          = IORESOURCE_MEM,
-       .start          = TS_RNG_DATA,
-       .end            = TS_RNG_DATA + 4 - 1,
-};
+static struct resource ts78xx_ts_rng_resource
+                       = DEFINE_RES_MEM(TS_RNG_DATA, 4);
 
 static struct timeriomem_rng_data ts78xx_ts_rng_data = {
        .period         = 1000000, /* one second */