Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1568925
| From | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] regulator: fixed: constify regulator_ops structure |
| Date | 2017-01-28 15:20 +0100 |
| Message-ID | <t4C1c-2wu-21@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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/fixed.o
text data bss dec hex filename
1239 192 0 1431 597 drivers/regulator/fixed.o
File size after: drivers/regulator/fixed.o
text data bss dec hex filename
1592 100 128 1820 71c drivers/regulator/fixed.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/regulator/fixed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index a43b0e8..9619022 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -135,7 +135,7 @@ struct fixed_voltage_data {
return config;
}
-static struct regulator_ops fixed_voltage_ops = {
+static const struct regulator_ops fixed_voltage_ops = {
};
static int reg_fixed_voltage_probe(struct platform_device *pdev)
--
1.9.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] regulator: fixed: constify regulator_ops structure Bhumika Goyal <bhumirks@gmail.com> - 2017-01-28 15:20 +0100
csiph-web