patch-2.3.23 linux/include/asm-arm/arch-ebsa285/io.h

Next file: linux/include/asm-arm/arch-ebsa285/irq.h
Previous file: linux/include/asm-arm/arch-ebsa285/hardware.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.22/linux/include/asm-arm/arch-ebsa285/io.h linux/include/asm-arm/arch-ebsa285/io.h
@@ -74,7 +74,9 @@
 	void *_ret = NULL;						\
 	if (valid_ioaddr(_addr, _size)) {				\
 		_addr = io_to_phys(_addr);				\
-		_ret = __ioremap(_addr, _size, 0) - IO_FUDGE_FACTOR;	\
+		_ret = __ioremap(_addr, _size, 0);			\
+		if (_ret)						\
+			_ret = (void *)((int) _ret - IO_FUDGE_FACTOR);	\
 	}								\
 	_ret; })
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)