From: Jesper Nilsson Date: Tue, 29 Jan 2008 09:43:05 +0000 (+0100) Subject: CRIS v32: Minor changes to avoid errors in asm-cris/arch-v32/hwregs/reg_rdwr.h X-Git-Tag: v2.6.25-rc1~40^2~15 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1791f539cd441c3f7926f2c449487af2b95466a1;p=linux-2.6 CRIS v32: Minor changes to avoid errors in asm-cris/arch-v32/hwregs/reg_rdwr.h - Add ifdef around macros to read and write hardware registers - Add parens around REG_READ expression to avoid possible precedence errors. - Remove useless CVS id tag. --- diff --git a/include/asm-cris/arch-v32/hwregs/reg_rdwr.h b/include/asm-cris/arch-v32/hwregs/reg_rdwr.h index 44e60233c6..236f91efe7 100644 --- a/include/asm-cris/arch-v32/hwregs/reg_rdwr.h +++ b/include/asm-cris/arch-v32/hwregs/reg_rdwr.h @@ -1,15 +1,17 @@ -/* $Id: reg_rdwr.h,v 1.6 2005/04/24 18:30:58 starvik Exp $ - * +/* * Read/write register macros used by *_defs.h */ #ifndef reg_rdwr_h #define reg_rdwr_h +#ifndef REG_READ +#define REG_READ(type, addr) (*((volatile type *) (addr))) +#endif -#define REG_READ(type, addr) *((volatile type *) (addr)) - +#ifndef REG_WRITE #define REG_WRITE(type, addr, val) \ do { *((volatile type *) (addr)) = (val); } while(0) +#endif #endif