linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] regulator: db8500-prcmu: Constify regulator_ops
@ 2019-04-12  1:54 Axel Lin
  2019-04-12  1:54 ` [PATCH 2/3] regulator: db8500-prcmu: Convert to use simplified DT parsing Axel Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Axel Lin @ 2019-04-12  1:54 UTC (permalink / raw)
  To: Mark Brown
  Cc: Bengt Jonsson, Mattias Nilsson, Lee Jones, Liam Girdwood,
	linux-kernel, Axel Lin

These regulator_ops variables never need to be modified, make them const so
compiler can put them to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/db8500-prcmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/db8500-prcmu.c b/drivers/regulator/db8500-prcmu.c
index 7cec535cf0bc..863bd3de42a7 100644
--- a/drivers/regulator/db8500-prcmu.c
+++ b/drivers/regulator/db8500-prcmu.c
@@ -75,7 +75,7 @@ static int db8500_regulator_is_enabled(struct regulator_dev *rdev)
 }
 
 /* db8500 regulator operations */
-static struct regulator_ops db8500_regulator_ops = {
+static const struct regulator_ops db8500_regulator_ops = {
 	.enable			= db8500_regulator_enable,
 	.disable		= db8500_regulator_disable,
 	.is_enabled		= db8500_regulator_is_enabled,
@@ -200,7 +200,7 @@ static int db8500_regulator_switch_is_enabled(struct regulator_dev *rdev)
 	return info->is_enabled;
 }
 
-static struct regulator_ops db8500_regulator_switch_ops = {
+static const struct regulator_ops db8500_regulator_switch_ops = {
 	.enable			= db8500_regulator_switch_enable,
 	.disable		= db8500_regulator_switch_disable,
 	.is_enabled		= db8500_regulator_switch_is_enabled,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-12  8:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-12  1:54 [PATCH 1/3] regulator: db8500-prcmu: Constify regulator_ops Axel Lin
2019-04-12  1:54 ` [PATCH 2/3] regulator: db8500-prcmu: Convert to use simplified DT parsing Axel Lin
2019-04-12  8:53   ` Applied "regulator: db8500-prcmu: Convert to use simplified DT parsing" to the regulator tree Mark Brown
2019-04-12  1:54 ` [PATCH 3/3] regulator: dbx500-prcmu: Remove unused fields from struct dbx500_regulator_info Axel Lin
2019-04-12  8:53   ` Applied "regulator: dbx500-prcmu: Remove unused fields from struct dbx500_regulator_info" to the regulator tree Mark Brown
2019-04-12  8:53 ` Applied "regulator: db8500-prcmu: Constify regulator_ops" " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).