Skip to content

Commit 82401bf

Browse files
author
Russell King
committed
ARM: fix set_domain() macro
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 <[email protected]>
1 parent 32e1eb5 commit 82401bf

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

arch/arm/include/asm/domain.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@
6060
#ifndef __ASSEMBLY__
6161

6262
#ifdef CONFIG_CPU_USE_DOMAINS
63-
#define set_domain(x) \
64-
do { \
65-
__asm__ __volatile__( \
66-
"mcr p15, 0, %0, c3, c0 @ set domain" \
67-
: : "r" (x)); \
68-
isb(); \
69-
} while (0)
63+
static inline void set_domain(unsigned val)
64+
{
65+
asm volatile(
66+
"mcr p15, 0, %0, c3, c0 @ set domain"
67+
: : "r" (val));
68+
isb();
69+
}
7070

7171
#define modify_domain(dom,type) \
7272
do { \
@@ -78,8 +78,8 @@
7878
} while (0)
7979

8080
#else
81-
#define set_domain(x) do { } while (0)
82-
#define modify_domain(dom,type) do { } while (0)
81+
static inline void set_domain(unsigned val) { }
82+
static inline void modify_domain(unsigned dom, unsigned type) { }
8383
#endif
8484

8585
/*

0 commit comments

Comments
 (0)