diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2009-11-23 12:34:58 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-11-23 12:34:58 -0500 |
commit | 9b8b317d58084b9a44f6f33b355c4278d9f841fb (patch) | |
tree | e0df89800bf4301c4017db3cdf04a2056ec1a852 /arch/arm/mach-omap2/gpmc.c | |
parent | 78c210efdefe07131f91ed512a3308b15bb14e2f (diff) | |
parent | 648f4e3e50c4793d9dbf9a09afa193631f76fa26 (diff) |
Merge commit 'v2.6.32-rc8' into HEAD
Diffstat (limited to 'arch/arm/mach-omap2/gpmc.c')
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 15876828db23..f3c992e29651 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) | |||
366 | if (r < 0) | 366 | if (r < 0) |
367 | goto out; | 367 | goto out; |
368 | 368 | ||
369 | gpmc_cs_enable_mem(cs, res->start, res->end - res->start + 1); | 369 | gpmc_cs_enable_mem(cs, res->start, resource_size(res)); |
370 | *base = res->start; | 370 | *base = res->start; |
371 | gpmc_cs_set_reserved(cs, 1); | 371 | gpmc_cs_set_reserved(cs, 1); |
372 | out: | 372 | out: |
@@ -378,7 +378,7 @@ EXPORT_SYMBOL(gpmc_cs_request); | |||
378 | void gpmc_cs_free(int cs) | 378 | void gpmc_cs_free(int cs) |
379 | { | 379 | { |
380 | spin_lock(&gpmc_mem_lock); | 380 | spin_lock(&gpmc_mem_lock); |
381 | if (cs >= GPMC_CS_NUM || !gpmc_cs_reserved(cs)) { | 381 | if (cs >= GPMC_CS_NUM || cs < 0 || !gpmc_cs_reserved(cs)) { |
382 | printk(KERN_ERR "Trying to free non-reserved GPMC CS%d\n", cs); | 382 | printk(KERN_ERR "Trying to free non-reserved GPMC CS%d\n", cs); |
383 | BUG(); | 383 | BUG(); |
384 | spin_unlock(&gpmc_mem_lock); | 384 | spin_unlock(&gpmc_mem_lock); |