blob: bc8c3881c729fb29128b373b8fb6e0ad68feac45 [file] [log] [blame]
Linus Torvaldseb71c872006-06-24 14:27:42 -07001#ifndef RESUME_TRACE_H
2#define RESUME_TRACE_H
3
4#ifdef CONFIG_PM_TRACE
Nigel Cunningham44bf4ce2007-07-21 17:10:41 +02005#include <asm/resume-trace.h>
Linus Torvaldseb71c872006-06-24 14:27:42 -07006
Rafael J. Wysockic5c6ba42006-09-25 23:32:58 -07007extern int pm_trace_enabled;
8
Rafael J. Wysocki5af84b82010-01-23 22:23:32 +01009static inline int pm_trace_is_enabled(void)
10{
11 return pm_trace_enabled;
12}
13
Linus Torvaldseb71c872006-06-24 14:27:42 -070014struct device;
15extern void set_trace_device(struct device *);
Jan Beulich63687a52008-05-12 15:44:41 +020016extern void generate_resume_trace(const void *tracedata, unsigned int user);
Linus Torvaldseb71c872006-06-24 14:27:42 -070017
Nigel Cunningham44bf4ce2007-07-21 17:10:41 +020018#define TRACE_DEVICE(dev) do { \
19 if (pm_trace_enabled) \
20 set_trace_device(dev); \
21 } while(0)
Linus Torvaldseb71c872006-06-24 14:27:42 -070022
23#else
24
Rafael J. Wysocki5af84b82010-01-23 22:23:32 +010025static inline int pm_trace_is_enabled(void) { return 0; }
26
Linus Torvaldseb71c872006-06-24 14:27:42 -070027#define TRACE_DEVICE(dev) do { } while (0)
28#define TRACE_RESUME(dev) do { } while (0)
29
30#endif
31
32#endif