History

powercap/dtpm: Destroy hierarchy function

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.

Daniel Lezcano committed 4 years ago

Commit c404c641 parent 690de0b2 files · +46 −0Browse files

Showing the changes to include (1 of 2 files). Show all

Unified · Split

include/linux/dtpm.h+3−0
@@ -37,6 +37,7 @@ struct device_node; · 36 unmodified lines
3737 struct dtpm_subsys_ops {
3838 const char *name;
3939 int (*init)(void);
40+ void (*exit)(void);
4041 int (*setup)(struct dtpm *, struct device_node *);
4142 };
4243
@@ -67,4 +68,6 @@ void dtpm_unregister(struct dtpm *dtpm); · 24 unmodified lines
6768 int dtpm_register(const char *name, struct dtpm *dtpm, struct dtpm *parent);
6869
6970 int dtpm_create_hierarchy(struct of_device_id *dtpm_match_table);
71+
72+void dtpm_destroy_hierarchy(void);
7073 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t