Skip to content

Commit

Permalink
Blackfin: fix addr type with bfin_write_{or,and} helpers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Frysinger committed May 25, 2011
1 parent 934fe05 commit 7a7a430
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/blackfin/include/asm/def_LPBlackfin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 7a7a430

Please sign in to comment.