From a180df71e7b3f40cc867accc41ac172ceda6c95a Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Sat, 28 Jan 2017 20:25:21 +0530 Subject: regulator: pbias-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/pbias-regulator.o text data bss dec hex filename 2545 624 0 3169 c61 regulator/pbias-regulator.o File size after: drivers/regulator/pbias-regulator.o text data bss dec hex filename 2801 368 0 3169 c61 regulator/pbias-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown --- drivers/regulator/pbias-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/regulator') diff --git a/drivers/regulator/pbias-regulator.c b/drivers/regulator/pbias-regulator.c index f9d74d63be7c..0cb76ba29e84 100644 --- a/drivers/regulator/pbias-regulator.c +++ b/drivers/regulator/pbias-regulator.c @@ -54,7 +54,7 @@ static const unsigned int pbias_volt_table[] = { 3000000 }; -static struct regulator_ops pbias_regulator_voltage_ops = { +static const struct regulator_ops pbias_regulator_voltage_ops = { .list_voltage = regulator_list_voltage_table, .get_voltage_sel = regulator_get_voltage_sel_regmap, .set_voltage_sel = regulator_set_voltage_sel_regmap, -- cgit v1.2.3 From 00804e6af96b4072eafb25337936532738dd537f Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Sat, 28 Jan 2017 20:27:15 +0530 Subject: regulator: pcap-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/pcap-regulator.o text data bss dec hex filename 5503 564 0 6067 17b3 regulator/pcap-regulator.o File size after: drivers/regulator/pcap-regulator.o text data bss dec hex filename 5759 308 0 6067 17b3 regulator/pcap-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown --- drivers/regulator/pcap-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/regulator') diff --git a/drivers/regulator/pcap-regulator.c b/drivers/regulator/pcap-regulator.c index 9b16e6158f15..79cb971a69bb 100644 --- a/drivers/regulator/pcap-regulator.c +++ b/drivers/regulator/pcap-regulator.c @@ -210,7 +210,7 @@ static int pcap_regulator_is_enabled(struct regulator_dev *rdev) return (tmp >> vreg->en) & 1; } -static struct regulator_ops pcap_regulator_ops = { +static const struct regulator_ops pcap_regulator_ops = { .list_voltage = regulator_list_voltage_table, .set_voltage_sel = pcap_regulator_set_voltage_sel, .get_voltage_sel = pcap_regulator_get_voltage_sel, -- cgit v1.2.3 From 0be794314add6249b72b700c16eb7fa973989b4d Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Sat, 28 Jan 2017 20:30:16 +0530 Subject: regulator: pcf50633-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/pcf50633-regulator.o text data bss dec hex filename 2763 464 0 3227 c9b regulator/pcf50633-regulator.o File size after: drivers/regulator/pcf50633-regulator.o text data bss dec hex filename 3019 192 0 3211 c8b regulator/pcf50633-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown --- drivers/regulator/pcf50633-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/regulator') diff --git a/drivers/regulator/pcf50633-regulator.c b/drivers/regulator/pcf50633-regulator.c index 134f90ec9ca1..762e18447cae 100644 --- a/drivers/regulator/pcf50633-regulator.c +++ b/drivers/regulator/pcf50633-regulator.c @@ -41,7 +41,7 @@ .enable_mask = PCF50633_REGULATOR_ON, \ } -static struct regulator_ops pcf50633_regulator_ops = { +static const struct regulator_ops pcf50633_regulator_ops = { .set_voltage_sel = regulator_set_voltage_sel_regmap, .get_voltage_sel = regulator_get_voltage_sel_regmap, .list_voltage = regulator_list_voltage_linear, -- cgit v1.2.3 From e5053853d8d7cd37275cc964bbc929e9e3c44c46 Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Sat, 28 Jan 2017 20:38:57 +0530 Subject: regulator: pfuze100-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/pfuze100-regulator.o text data bss dec hex filename 3552 12528 16 16096 3ee0 regulator/pfuze100-regulator.o File size after: drivers/regulator/pfuze100-regulator.o text data bss dec hex filename 4576 11496 16 16088 3ed8 regulator/pfuze100-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown --- drivers/regulator/pfuze100-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/regulator') diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c index cb18b5c4f2db..e193bbbb8ffc 100644 --- a/drivers/regulator/pfuze100-regulator.c +++ b/drivers/regulator/pfuze100-regulator.c @@ -126,7 +126,7 @@ static int pfuze100_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay) return ret; } -static struct regulator_ops pfuze100_ldo_regulator_ops = { +static const struct regulator_ops pfuze100_ldo_regulator_ops = { .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, .is_enabled = regulator_is_enabled_regmap, @@ -135,14 +135,14 @@ static struct regulator_ops pfuze100_ldo_regulator_ops = { .get_voltage_sel = regulator_get_voltage_sel_regmap, }; -static struct regulator_ops pfuze100_fixed_regulator_ops = { +static const struct regulator_ops pfuze100_fixed_regulator_ops = { .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, .is_enabled = regulator_is_enabled_regmap, .list_voltage = regulator_list_voltage_linear, }; -static struct regulator_ops pfuze100_sw_regulator_ops = { +static const struct regulator_ops pfuze100_sw_regulator_ops = { .list_voltage = regulator_list_voltage_linear, .set_voltage_sel = regulator_set_voltage_sel_regmap, .get_voltage_sel = regulator_get_voltage_sel_regmap, @@ -150,7 +150,7 @@ static struct regulator_ops pfuze100_sw_regulator_ops = { .set_ramp_delay = pfuze100_set_ramp_delay, }; -static struct regulator_ops pfuze100_swb_regulator_ops = { +static const struct regulator_ops pfuze100_swb_regulator_ops = { .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, .list_voltage = regulator_list_voltage_table, -- cgit v1.2.3 From ea51874cb34dd8e25181603c91030e42e4428453 Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Sat, 28 Jan 2017 20:40:51 +0530 Subject: regulator: pv88060-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/pv88060-regulator.o text data bss dec hex filename 6195 752 8 6955 1b2b regulator/pv88060-regulator.o File size after: drivers/regulator/pv88060-regulator.o text data bss dec hex filename 6739 240 8 6987 1b4b regulator/pv88060-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown --- drivers/regulator/pv88060-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/regulator') diff --git a/drivers/regulator/pv88060-regulator.c b/drivers/regulator/pv88060-regulator.c index 6c4afc73ecac..a9446056435f 100644 --- a/drivers/regulator/pv88060-regulator.c +++ b/drivers/regulator/pv88060-regulator.c @@ -162,7 +162,7 @@ static int pv88060_get_current_limit(struct regulator_dev *rdev) return info->current_limits[data]; } -static struct regulator_ops pv88060_buck_ops = { +static const struct regulator_ops pv88060_buck_ops = { .get_mode = pv88060_buck_get_mode, .set_mode = pv88060_buck_set_mode, .enable = regulator_enable_regmap, @@ -175,7 +175,7 @@ static struct regulator_ops pv88060_buck_ops = { .get_current_limit = pv88060_get_current_limit, }; -static struct regulator_ops pv88060_ldo_ops = { +static const struct regulator_ops pv88060_ldo_ops = { .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, .is_enabled = regulator_is_enabled_regmap, -- cgit v1.2.3