From 1e79348921770a8d6628b6138749a19e187398d6 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 20 Jan 2010 18:10:30 +0900 Subject: [PATCH] --- yaml --- r: 181134 b: refs/heads/master c: 920efaabcbd34e6b8dc05c5b777df3e936af5812 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/sh/mm/ioremap_fixed.c | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 85efb2b0ab53..39203c040c9b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b51989b8afe9409ee68c67ce2a5de4390693bd2b +refs/heads/master: 920efaabcbd34e6b8dc05c5b777df3e936af5812 diff --git a/trunk/arch/sh/mm/ioremap_fixed.c b/trunk/arch/sh/mm/ioremap_fixed.c index 551b513e8fce..0b78b1e20ef1 100644 --- a/trunk/arch/sh/mm/ioremap_fixed.c +++ b/trunk/arch/sh/mm/ioremap_fixed.c @@ -93,9 +93,7 @@ ioremap_fixed(resource_size_t phys_addr, unsigned long offset, int iounmap_fixed(void __iomem *addr) { enum fixed_addresses idx; - unsigned long virt_addr; struct ioremap_map *map; - unsigned long offset; unsigned int nrpages; int i, slot; @@ -114,12 +112,9 @@ int iounmap_fixed(void __iomem *addr) if (slot < 0) return -EINVAL; - virt_addr = (unsigned long)addr; + nrpages = map->size >> PAGE_SHIFT; - offset = virt_addr & ~PAGE_MASK; - nrpages = PAGE_ALIGN(offset + map->size - 1) >> PAGE_SHIFT; - - idx = FIX_IOREMAP_BEGIN + slot + nrpages; + idx = FIX_IOREMAP_BEGIN + slot + nrpages - 1; while (nrpages > 0) { __clear_fixmap(idx, __pgprot(_PAGE_WIRED)); --idx;