Skip to content

Commit

Permalink
clk: socfpga: add const to _ops data structures
Browse files Browse the repository at this point in the history
All the static clk_ops data structure need a const.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lkml.kernel.org/r/20200512181647.5071-3-dinguyen@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Dinh Nguyen authored and Stephen Boyd committed May 27, 2020
1 parent 535d936 commit d52579c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/clk/socfpga/clk-pll-a10.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static u8 clk_pll_get_parent(struct clk_hw *hwclk)
CLK_MGR_PLL_CLK_SRC_MASK;
}

static struct clk_ops clk_pll_ops = {
static const struct clk_ops clk_pll_ops = {
.recalc_rate = clk_pll_recalc_rate,
.get_parent = clk_pll_get_parent,
};
Expand Down
4 changes: 2 additions & 2 deletions drivers/clk/socfpga/clk-pll-s10.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ static int clk_pll_prepare(struct clk_hw *hwclk)
return 0;
}

static struct clk_ops clk_pll_ops = {
static const struct clk_ops clk_pll_ops = {
.recalc_rate = clk_pll_recalc_rate,
.get_parent = clk_pll_get_parent,
.prepare = clk_pll_prepare,
};

static struct clk_ops clk_boot_ops = {
static const struct clk_ops clk_boot_ops = {
.recalc_rate = clk_boot_clk_recalc_rate,
.get_parent = clk_boot_get_parent,
.prepare = clk_pll_prepare,
Expand Down
2 changes: 1 addition & 1 deletion drivers/clk/socfpga/clk-pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static u8 clk_pll_get_parent(struct clk_hw *hwclk)
CLK_MGR_PLL_CLK_SRC_MASK;
}

static struct clk_ops clk_pll_ops = {
static const struct clk_ops clk_pll_ops = {
.recalc_rate = clk_pll_recalc_rate,
.get_parent = clk_pll_get_parent,
};
Expand Down

0 comments on commit d52579c

Please sign in to comment.