Linus Torvalds | eb71c87 | 2006-06-24 14:27:42 -0700 | [diff] [blame] | 1 | #ifndef RESUME_TRACE_H |
| 2 | #define RESUME_TRACE_H |
| 3 | |
| 4 | #ifdef CONFIG_PM_TRACE |
Nigel Cunningham | 44bf4ce | 2007-07-21 17:10:41 +0200 | [diff] [blame] | 5 | #include <asm/resume-trace.h> |
Linus Torvalds | eb71c87 | 2006-06-24 14:27:42 -0700 | [diff] [blame] | 6 | |
Rafael J. Wysocki | c5c6ba4 | 2006-09-25 23:32:58 -0700 | [diff] [blame] | 7 | extern int pm_trace_enabled; |
| 8 | |
Linus Torvalds | eb71c87 | 2006-06-24 14:27:42 -0700 | [diff] [blame] | 9 | struct device; |
| 10 | extern void set_trace_device(struct device *); |
Jan Beulich | 63687a5 | 2008-05-12 15:44:41 +0200 | [diff] [blame] | 11 | extern void generate_resume_trace(const void *tracedata, unsigned int user); |
Linus Torvalds | eb71c87 | 2006-06-24 14:27:42 -0700 | [diff] [blame] | 12 | |
Nigel Cunningham | 44bf4ce | 2007-07-21 17:10:41 +0200 | [diff] [blame] | 13 | #define TRACE_DEVICE(dev) do { \ |
| 14 | if (pm_trace_enabled) \ |
| 15 | set_trace_device(dev); \ |
| 16 | } while(0) |
Linus Torvalds | eb71c87 | 2006-06-24 14:27:42 -0700 | [diff] [blame] | 17 | |
| 18 | #else |
| 19 | |
| 20 | #define TRACE_DEVICE(dev) do { } while (0) |
| 21 | #define TRACE_RESUME(dev) do { } while (0) |
| 22 | |
| 23 | #endif |
| 24 | |
| 25 | #endif |