Skip to content

Commit

Permalink
ARM: fix set_domain() macro
Browse files Browse the repository at this point in the history
Avoid polluting drivers with a set_domain() macro, which interferes with
structure member names:

drivers/net/wireless/ath/ath9k/dfs_pattern_detector.c:294:33: error: macro "set_domain" passed 2 arguments, but takes just 1

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Jul 5, 2012
1 parent 32e1eb5 commit 82401bf
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions arch/arm/include/asm/domain.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@
#ifndef __ASSEMBLY__

#ifdef CONFIG_CPU_USE_DOMAINS
#define set_domain(x) \
do { \
__asm__ __volatile__( \
"mcr p15, 0, %0, c3, c0 @ set domain" \
: : "r" (x)); \
isb(); \
} while (0)
static inline void set_domain(unsigned val)
{
asm volatile(
"mcr p15, 0, %0, c3, c0 @ set domain"
: : "r" (val));
isb();
}

#define modify_domain(dom,type) \
do { \
Expand All @@ -78,8 +78,8 @@
} while (0)

#else
#define set_domain(x) do { } while (0)
#define modify_domain(dom,type) do { } while (0)
static inline void set_domain(unsigned val) { }
static inline void modify_domain(unsigned dom, unsigned type) { }
#endif

/*
Expand Down

0 comments on commit 82401bf

Please sign in to comment.