| .. | .. |
|---|
| 7 | 7 | #ifdef CONFIG_CPU_IDLE |
|---|
| 8 | 8 | extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev, |
|---|
| 9 | 9 | struct cpuidle_driver *drv, int index); |
|---|
| 10 | +#define __cpuidle_method_section __used __section("__cpuidle_method_of_table") |
|---|
| 10 | 11 | #else |
|---|
| 11 | 12 | static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev, |
|---|
| 12 | 13 | struct cpuidle_driver *drv, int index) { return -ENODEV; } |
|---|
| 14 | +#define __cpuidle_method_section __maybe_unused /* drop silently */ |
|---|
| 13 | 15 | #endif |
|---|
| 14 | 16 | |
|---|
| 15 | 17 | /* Common ARM WFI state */ |
|---|
| .. | .. |
|---|
| 42 | 44 | |
|---|
| 43 | 45 | #define CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops) \ |
|---|
| 44 | 46 | static const struct of_cpuidle_method __cpuidle_method_of_table_##name \ |
|---|
| 45 | | - __used __section(__cpuidle_method_of_table) \ |
|---|
| 46 | | - = { .method = _method, .ops = _ops } |
|---|
| 47 | + __cpuidle_method_section = { .method = _method, .ops = _ops } |
|---|
| 47 | 48 | |
|---|
| 48 | 49 | extern int arm_cpuidle_suspend(int index); |
|---|
| 49 | 50 | |
|---|