diff options
author | Gideon Israel Dsouza <gidisrael@gmail.com> | 2014-04-07 18:39:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-07 19:36:11 -0400 |
commit | 52f5684c8e1ec7463192aba8e2916df49807511a (patch) | |
tree | f8e6061de05014e89e58638f626831f2c38af971 /kernel/power/suspend.c | |
parent | ce816fa88cca083c47ab9000b2138a83043a78be (diff) |
kernel: use macros from compiler.h instead of __attribute__((...))
To increase compiler portability there is <linux/compiler.h> which
provides convenience macros for various gcc constructs. Eg: __weak for
__attribute__((weak)). I've replaced all instances of gcc attributes
with the right macro in the kernel subsystem.
Signed-off-by: Gideon Israel Dsouza <gidisrael@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/power/suspend.c')
-rw-r--r-- | kernel/power/suspend.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index 90b3d9366d1a..c3ad9cafe930 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/syscore_ops.h> | 26 | #include <linux/syscore_ops.h> |
27 | #include <linux/ftrace.h> | 27 | #include <linux/ftrace.h> |
28 | #include <trace/events/power.h> | 28 | #include <trace/events/power.h> |
29 | #include <linux/compiler.h> | ||
29 | 30 | ||
30 | #include "power.h" | 31 | #include "power.h" |
31 | 32 | ||
@@ -156,13 +157,13 @@ static int suspend_prepare(suspend_state_t state) | |||
156 | } | 157 | } |
157 | 158 | ||
158 | /* default implementation */ | 159 | /* default implementation */ |
159 | void __attribute__ ((weak)) arch_suspend_disable_irqs(void) | 160 | void __weak arch_suspend_disable_irqs(void) |
160 | { | 161 | { |
161 | local_irq_disable(); | 162 | local_irq_disable(); |
162 | } | 163 | } |
163 | 164 | ||
164 | /* default implementation */ | 165 | /* default implementation */ |
165 | void __attribute__ ((weak)) arch_suspend_enable_irqs(void) | 166 | void __weak arch_suspend_enable_irqs(void) |
166 | { | 167 | { |
167 | local_irq_enable(); | 168 | local_irq_enable(); |
168 | } | 169 | } |