[PATCH] powerpc: fix dcr_unmap()

Jean-Christophe Dubois jdubois at mc.com
Wed Mar 28 20:07:41 EST 2007


Fix a bug in dcr_unmap(). 

At unmap time the DCR offset need to be added instead of substracted.

Signed-off-by: Jean-Christophe Dubois <jdubois at mc.com>

Index: linux-2.6.20/arch/powerpc/sysdev/dcr.c
===================================================================
--- linux-2.6.20.orig/arch/powerpc/sysdev/dcr.c
+++ linux-2.6.20/arch/powerpc/sysdev/dcr.c
@@ -129,7 +129,7 @@ void dcr_unmap(dcr_host_t host, unsigned
 
 	if (h.token == NULL)
 		return;
-	h.token -= dcr_n * h.stride;
+	h.token += dcr_n * h.stride;
 	iounmap(h.token);
 	h.token = NULL;
 }



More information about the Linuxppc-dev mailing list