* [PATCH] regulator: fixed: constify regulator_ops structure
@ 2017-01-28 14:06 Bhumika Goyal
2017-01-31 20:45 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-01-28 14:06 UTC (permalink / raw)
To: julia.lawall, lgirdwood, broonie, linux-kernel; +Cc: Bhumika Goyal
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: fixed: constify regulator_ops structure
2017-01-28 14:06 [PATCH] regulator: fixed: constify regulator_ops structure Bhumika Goyal
@ 2017-01-31 20:45 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2017-01-31 20:45 UTC (permalink / raw)
To: Bhumika Goyal; +Cc: julia.lawall, lgirdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 340 bytes --]
On Sat, Jan 28, 2017 at 07:36:09PM +0530, Bhumika Goyal wrote:
> 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.
Sorry, it's *this* change that doens't apply - my mistake.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-31 20:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-28 14:06 [PATCH] regulator: fixed: constify regulator_ops structure Bhumika Goyal
2017-01-31 20:45 ` 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).