The hierarchy creation function exits but without a destroy hierarchy function. Due to that, the modules creating the hierarchy can not be unloaded properly because they don't have an exit callback. Provide the dtpm_destroy_hierarchy() function to remove the previously created hierarchy. The function relies on all the release mechanisms implemented by the underlying powercap framework.
Showing the changes to include (1 of 2 files). Show all
Unified · Split
| @@ -37,6 +37,7 @@ struct device_node; · 36 unmodified lines | ||
| 37 | 37 | struct dtpm_subsys_ops { |
| 38 | 38 | const char *name; |
| 39 | 39 | int (*init)(void); |
| 40 | + void (*exit)(void); | |
| 40 | 41 | int (*setup)(struct dtpm *, struct device_node *); |
| 41 | 42 | }; |
| 42 | 43 | |
| @@ -67,4 +68,6 @@ void dtpm_unregister(struct dtpm *dtpm); · 24 unmodified lines | ||
| 67 | 68 | int dtpm_register(const char *name, struct dtpm *dtpm, struct dtpm *parent); |
| 68 | 69 | |
| 69 | 70 | int dtpm_create_hierarchy(struct of_device_id *dtpm_match_table); |
| 71 | + | |
| 72 | +void dtpm_destroy_hierarchy(void); | |
| 70 | 73 | #endif |