diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-05-19 02:46:03 +0200 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-05-25 14:24:13 +0200 |
commit | 7a7a430f7498cd55820232d8e3f144161138f91a (patch) | |
tree | 891b1bf4f9df8d7a165cae1fc5707c569251673e /arch/blackfin | |
parent | Blackfin: convert /proc/sram to seq_file (diff) | |
download | linux-7a7a430f7498cd55820232d8e3f144161138f91a.tar.xz linux-7a7a430f7498cd55820232d8e3f144161138f91a.zip |
Blackfin: fix addr type with bfin_write_{or,and} helpers
Since the bfin_write() func needs proper type information in order to
expand into the right bfin_writeX() variant, preserve the addr's type
when setting up the local __addr. Otherwise the helpers will detect
the variant based upon sizeof(void) which is almost never right.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/include/asm/def_LPBlackfin.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/blackfin/include/asm/def_LPBlackfin.h b/arch/blackfin/include/asm/def_LPBlackfin.h index 6bc2db60712f..823679011457 100644 --- a/arch/blackfin/include/asm/def_LPBlackfin.h +++ b/arch/blackfin/include/asm/def_LPBlackfin.h @@ -69,13 +69,13 @@ do { \ #define bfin_write_or(addr, bits) \ do { \ - void *__addr = (void *)(addr); \ + typeof(addr) __addr = (addr); \ bfin_write(__addr, bfin_read(__addr) | (bits)); \ } while (0) #define bfin_write_and(addr, bits) \ do { \ - void *__addr = (void *)(addr); \ + typeof(addr) __addr = (addr); \ bfin_write(__addr, bfin_read(__addr) & (bits)); \ } while (0) |