Skip to content

Commit ee1f9df

Browse files
pcercueiamalon
authored andcommitted
clk: ingenic: Use const pointer to clk_ops in struct
The CGU common code does not modify the pointed clk_ops structure, so it should be marked as const. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Acked-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Maarten ter Huurne <maarten@treewalker.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18476/ Signed-off-by: James Hogan <jhogan@kernel.org>
1 parent 83aa53e commit ee1f9df

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/clk/ingenic/cgu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ struct ingenic_cgu_gate_info {
120120
* @clk_ops: custom clock operation callbacks
121121
*/
122122
struct ingenic_cgu_custom_info {
123-
struct clk_ops *clk_ops;
123+
const struct clk_ops *clk_ops;
124124
};
125125

126126
/**

drivers/clk/ingenic/jz4780-cgu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ static int jz4780_otg_phy_set_rate(struct clk_hw *hw, unsigned long req_rate,
203203
return 0;
204204
}
205205

206-
static struct clk_ops jz4780_otg_phy_ops = {
206+
static const struct clk_ops jz4780_otg_phy_ops = {
207207
.get_parent = jz4780_otg_phy_get_parent,
208208
.set_parent = jz4780_otg_phy_set_parent,
209209

0 commit comments

Comments
 (0)