mirror of
https://github.com/torvalds/linux.git
synced 2024-09-28 02:43:02 +00:00
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.
This commit is contained in:
parent
b8ed6b4d83
commit
1791f539cd
|
@ -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
|
* Read/write register macros used by *_defs.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef reg_rdwr_h
|
#ifndef reg_rdwr_h
|
||||||
#define 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) \
|
#define REG_WRITE(type, addr, val) \
|
||||||
do { *((volatile type *) (addr)) = (val); } while(0)
|
do { *((volatile type *) (addr)) = (val); } while(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user