|
30 | 30 | * macro, which uses the provided callbacks for both runtime PM and system
|
31 | 31 | * sleep, while DEFINE_RUNTIME_DEV_PM_OPS() uses pm_runtime_force_suspend()
|
32 | 32 | * and pm_runtime_force_resume() for its system sleep callbacks.
|
| 33 | + * |
| 34 | + * If the underlying dev_pm_ops struct symbol has to be exported, use |
| 35 | + * EXPORT_RUNTIME_DEV_PM_OPS() or EXPORT_GPL_RUNTIME_DEV_PM_OPS() instead. |
33 | 36 | */
|
34 | 37 | #define DEFINE_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \
|
35 | 38 | _DEFINE_DEV_PM_OPS(name, pm_runtime_force_suspend, \
|
36 | 39 | pm_runtime_force_resume, suspend_fn, \
|
37 | 40 | resume_fn, idle_fn)
|
38 | 41 |
|
| 42 | +#define EXPORT_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \ |
| 43 | + _EXPORT_DEV_PM_OPS(name, pm_runtime_force_suspend, pm_runtime_force_resume, \ |
| 44 | + suspend_fn, resume_fn, idle_fn, "") |
| 45 | +#define EXPORT_GPL_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \ |
| 46 | + _EXPORT_DEV_PM_OPS(name, pm_runtime_force_suspend, pm_runtime_force_resume, \ |
| 47 | + suspend_fn, resume_fn, idle_fn, "_gpl") |
| 48 | + |
39 | 49 | #ifdef CONFIG_PM
|
40 | 50 | extern struct workqueue_struct *pm_wq;
|
41 | 51 |
|
|
0 commit comments