Skip to contentSkip to conversation

sh: fix P4 iounmap() pass-through

PATCH New Magnus Damm 1 participant 1 message Feb 24, 2009 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: fix P4 iounmap() pass-through

From: Magnus Damm <[email protected]>

Fix iounmap() of pass-through P4 addresses. Without this patch iounmap() on the sh7780 rtc area results in a warning message.

---

 arch/sh/mm/ioremap_32.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/mm/ioremap_32.c +1 -1
@@ -119,7 +119,7 @@ void __iounmap(void __iomem *addr)
 	unsigned long seg = PXSEG(vaddr);
 	struct vm_struct *p;
 
-	if (seg < P3SEG || seg >= P3_ADDR_MAX || is_pci_memaddr(vaddr))
+	if (seg < P3SEG || vaddr >= P3_ADDR_MAX || is_pci_memaddr(vaddr))
 		return;
 
 #ifdef CONFIG_32BIT