diff options
author | David S. Miller <davem@davemloft.net> | 2009-11-19 01:19:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-19 01:19:03 -0500 |
commit | 3505d1a9fd65e2d3e00827857b6795d9d8983658 (patch) | |
tree | 941cfafdb57c427bb6b7ebf6354ee93b2a3693b5 /arch/arm/mach-omap2/gpmc.c | |
parent | dfef948ed2ba69cf041840b5e860d6b4e16fa0b1 (diff) | |
parent | 66b00a7c93ec782d118d2c03bd599cfd041e80a1 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/sfc/sfe4001.c
drivers/net/wireless/libertas/cmd.c
drivers/staging/Kconfig
drivers/staging/Makefile
drivers/staging/rtl8187se/Kconfig
drivers/staging/rtl8192e/Kconfig
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); |