Skip to contentSkip to conversation

clk: hisilicon: make clk_ops const

PATCH Applied Bhumika Goyal 2 participants 2 messages Aug 22, 2017 – Nov 2, 2017 Common clk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: hisilicon: make clk_ops const

Make these const as they are only stored in the const field of a clk_init_data structure.

---
 drivers/clk/hisilicon/clk-hi3620.c        | 2 +-
 drivers/clk/hisilicon/clk-hix5hd2.c       | 4 ++--
 drivers/clk/hisilicon/clkgate-separated.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/clk/hisilicon/clk-hi3620.c +1 -1
index fa0fba6..77072c7 100644
@@ -415,7 +415,7 @@ static int mmc_clk_set_rate(struct clk_hw *hw, unsigned long rate,
 	return mmc_clk_set_timing(hw, rate);
 }
 
-static struct clk_ops clk_mmc_ops = {
+static const struct clk_ops clk_mmc_ops = {
 	.prepare = mmc_clk_prepare,
 	.determine_rate = mmc_clk_determine_rate,
 	.set_rate = mmc_clk_set_rate,
drivers/clk/hisilicon/clk-hix5hd2.c +2 -2
index 14b05ef..9584f0c 100644
@@ -208,7 +208,7 @@ static void clk_ether_unprepare(struct clk_hw *hw)
 	writel_relaxed(val, clk->ctrl_reg);
 }
 
-static struct clk_ops clk_ether_ops = {
+static const struct clk_ops clk_ether_ops = {
 	.prepare = clk_ether_prepare,
 	.unprepare = clk_ether_unprepare,
 };
@@ -247,7 +247,7 @@ static void clk_complex_disable(struct clk_hw *hw)
 	writel_relaxed(val, clk->phy_reg);
 }
 
-static struct clk_ops clk_complex_ops = {
+static const struct clk_ops clk_complex_ops = {
 	.enable = clk_complex_enable,
 	.disable = clk_complex_disable,
 };
drivers/clk/hisilicon/clkgate-separated.c +1 -1
index 7908bc3..1172b09 100644
@@ -88,7 +88,7 @@ static int clkgate_separated_is_enabled(struct clk_hw *hw)
 	return reg ? 1 : 0;
 }
 
-static struct clk_ops clkgate_separated_ops = {
+static const struct clk_ops clkgate_separated_ops = {
 	.enable		= clkgate_separated_enable,
 	.disable	= clkgate_separated_disable,
 	.is_enabled	= clkgate_separated_is_enabled,
Signature · 1 line
1.9.1
Applied
#1 lore raw
Quoted 5 lines · Bhumika Goyal

Make these const as they are only stored in the const field of a clk_init_data structure.

---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project