resume-trace.h 700 字节
Newer Older
1 2 3 4
#ifndef RESUME_TRACE_H
#define RESUME_TRACE_H

#ifdef CONFIG_PM_TRACE
N
Nigel Cunningham 已提交
5
#include <asm/resume-trace.h>
6
#include <linux/types.h>
7

8 9
extern int pm_trace_enabled;

10 11 12 13 14
static inline int pm_trace_is_enabled(void)
{
       return pm_trace_enabled;
}

15 16
struct device;
extern void set_trace_device(struct device *);
J
Jan Beulich 已提交
17
extern void generate_resume_trace(const void *tracedata, unsigned int user);
18
extern int show_trace_dev_match(char *buf, size_t size);
19

N
Nigel Cunningham 已提交
20 21 22 23
#define TRACE_DEVICE(dev) do { \
	if (pm_trace_enabled) \
		set_trace_device(dev); \
	} while(0)
24 25 26

#else

27 28
static inline int pm_trace_is_enabled(void) { return 0; }

29 30 31 32 33 34
#define TRACE_DEVICE(dev) do { } while (0)
#define TRACE_RESUME(dev) do { } while (0)

#endif

#endif