diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2009-11-10 18:55:19 -0800 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-11-10 18:55:19 -0800 |
commit | 6d1352420901b0a74e6149a891ff4457f7199651 (patch) | |
tree | a623ed28c2cde8d3dcb4b0c8681f682f4d58017e /arch/arm/mach-omap2/gpmc.c | |
parent | ee90732456fe8e75406fdd3cd136a4bfb7ce31f5 (diff) |
omap: Use resource_size
Use the resource_size function instead of manually calculating the
resource size. This reduces the chance of introducing off-by-one errors
and actually fixes one in mailbox.c.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/gpmc.c')
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 15876828db2..f8657568b1b 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -366,7 +366,7 @@ int gpmc_cs_request(int cs, unsigned long size, unsigned long *base) if (r < 0) goto out; - gpmc_cs_enable_mem(cs, res->start, res->end - res->start + 1); + gpmc_cs_enable_mem(cs, res->start, resource_size(res)); *base = res->start; gpmc_cs_set_reserved(cs, 1); out: |