Skip to contentSkip to conversation

clk: ti: make clk_ops const

PATCH Applied Bhumika Goyal 3 participants 3 messages Aug 22, 2017 – Aug 23, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: ti: make clk_ops const

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

---
 drivers/clk/ti/adpll.c | 2 +-
 drivers/clk/ti/apll.c  | 2 +-
 drivers/clk/ti/fapll.c | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/clk/ti/adpll.c +1 -1
index 255cafb..d5c6db4 100644
@@ -486,7 +486,7 @@ static u8 ti_adpll_get_parent(struct clk_hw *hw)
 	return 0;
 }
 
-static struct clk_ops ti_adpll_ops = {
+static const struct clk_ops ti_adpll_ops = {
 	.prepare = ti_adpll_prepare,
 	.unprepare = ti_adpll_unprepare,
 	.is_prepared = ti_adpll_is_prepared,
drivers/clk/ti/apll.c +1 -1
index 06f486b..83b148f 100644
@@ -304,7 +304,7 @@ static void omap2_apll_disable(struct clk_hw *hw)
 	ti_clk_ll_ops->clk_writel(v, &ad->control_reg);
 }
 
-static struct clk_ops omap2_apll_ops = {
+static const struct clk_ops omap2_apll_ops = {
 	.enable		= &omap2_apll_enable,
 	.disable	= &omap2_apll_disable,
 	.is_enabled	= &omap2_apll_is_enabled,
drivers/clk/ti/fapll.c +2 -2
index 66a0d0e..071af44 100644
@@ -268,7 +268,7 @@ static int ti_fapll_set_rate(struct clk_hw *hw, unsigned long rate,
 	return 0;
 }
 
-static struct clk_ops ti_fapll_ops = {
+static const struct clk_ops ti_fapll_ops = {
 	.enable = ti_fapll_enable,
 	.disable = ti_fapll_disable,
 	.is_enabled = ti_fapll_is_enabled,
@@ -478,7 +478,7 @@ static int ti_fapll_synth_set_rate(struct clk_hw *hw, unsigned long rate,
 	return 0;
 }
 
-static struct clk_ops ti_fapll_synt_ops = {
+static const struct clk_ops ti_fapll_synt_ops = {
 	.enable = ti_fapll_synth_enable,
 	.disable = ti_fapll_synth_disable,
 	.is_enabled = ti_fapll_synth_is_enabled,
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw

=EF=BB=BF
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Bu= siness ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Quoted 4 lines · Bhumika Goyal

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

Looks fine.

drivers/clk/ti/fapll.c static int ti_fapll_set_rate(struct clk_hw *hw, unsig=

Quoted 37 lines
---
  drivers/clk/ti/adpll.c | 2 +-
  drivers/clk/ti/apll.c  | 2 +-
  drivers/clk/ti/fapll.c | 4 ++--
  3 files changed, 4 insertions(+), 4 deletions(-)

=20

drivers/clk/ti/adpll.c +1 -1
index 255cafb..d5c6db4 100644
@@ -486,7 +486,7 @@ static u8 ti_adpll_get_parent(struct clk_hw *hw)
  	return 0;
  }
 =20
-static struct clk_ops ti_adpll_ops =3D {
+static const struct clk_ops ti_adpll_ops =3D {
  	.prepare =3D ti_adpll_prepare,
  	.unprepare =3D ti_adpll_unprepare,
  	.is_prepared =3D ti_adpll_is_prepared,
drivers/clk/ti/apll.c +1 -1
index 06f486b..83b148f 100644
@@ -304,7 +304,7 @@ static void omap2_apll_disable(struct clk_hw *hw)
  	ti_clk_ll_ops->clk_writel(v, &ad->control_reg);
  }
 =20
-static struct clk_ops omap2_apll_ops =3D {
+static const struct clk_ops omap2_apll_ops =3D {
  	.enable		=3D &omap2_apll_enable,
  	.disable	=3D &omap2_apll_disable,
  	.is_enabled	=3D &omap2_apll_is_enabled,
drivers/clk/ti/fapll.c +0 -0
index 66a0d0e..071af44 100644
@@ -268,7 +268,7 @@ static int ti_fapll_set_rate(struct clk_hw *hw, unsig=

ned long rate,

drivers/clk/ti/fapll.c static int ti_fapll_synth_set_rate(struct clk_hw *hw,=

Quoted 9 lines
drivers/clk/ti/fapll.c +1 -1
  	return 0;
  }
 =20
-static struct clk_ops ti_fapll_ops =3D {
+static const struct clk_ops ti_fapll_ops =3D {
  	.enable =3D ti_fapll_enable,
  	.disable =3D ti_fapll_disable,
  	.is_enabled =3D ti_fapll_is_enabled,
@@ -478,7 +478,7 @@ static int ti_fapll_synth_set_rate(struct clk_hw *hw,=

unsigned long rate,

Quoted 9 lines
drivers/clk/ti/fapll.c +1 -1
  	return 0;
  }
 =20
-static struct clk_ops ti_fapll_synt_ops =3D {
+static const struct clk_ops ti_fapll_synt_ops =3D {
  	.enable =3D ti_fapll_synth_enable,
  	.disable =3D ti_fapll_synth_disable,
  	.is_enabled =3D ti_fapll_synth_is_enabled,

=20

Applied
#2 lore raw
In reply to Bhumika Goyal
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