Add a terminate callback to the clk_ops to release the resources claimed in .init()
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -197,6 +197,8 @@ struct clk_duty { · 196 unmodified lines | |||
| 197 | * such as rate or parents. | 197 | * such as rate or parents. |
| 198 | * Returns 0 on success, -EERROR otherwise. | 198 | * Returns 0 on success, -EERROR otherwise. |
| 199 | * | 199 | * |
| 200 | * @terminate: Free any resource allocated by init. | ||
| 201 | * | ||
| 200 | * @debug_init: Set up type-specific debugfs entries for this clock. This | 202 | * @debug_init: Set up type-specific debugfs entries for this clock. This |
| 201 | * is called once, after the debugfs directory entry for this | 203 | * is called once, after the debugfs directory entry for this |
| 202 | * clock has been created. The dentry pointer representing that | 204 | * clock has been created. The dentry pointer representing that |
| @@ -248,6 +250,7 @@ struct clk_ops { · 45 unmodified lines | |||
| 248 | int (*set_duty_cycle)(struct clk_hw *hw, | 250 | int (*set_duty_cycle)(struct clk_hw *hw, |
| 249 | struct clk_duty *duty); | 251 | struct clk_duty *duty); |
| 250 | int (*init)(struct clk_hw *hw); | 252 | int (*init)(struct clk_hw *hw); |
| 253 | void (*terminate)(struct clk_hw *hw); | ||
| 251 | void (*debug_init)(struct clk_hw *hw, struct dentry *dentry); | 254 | void (*debug_init)(struct clk_hw *hw, struct dentry *dentry); |
| 252 | }; | 255 | }; |
| 253 | 256 | ||