2017-06-13 09:57:13

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH] pwm: pwm-hibvt: constify hibvt_pwm_ops

File size before:
text data bss dec hex filename
1510 296 0 1806 70e drivers/pwm/pwm-hibvt.o
File size After adding 'const':
text data bss dec hex filename
1606 192 0 1798 706 drivers/pwm/pwm-hibvt.o

Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/pwm/pwm-hibvt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-hibvt.c b/drivers/pwm/pwm-hibvt.c
index d0e8f85..8dadc58 100644
--- a/drivers/pwm/pwm-hibvt.c
+++ b/drivers/pwm/pwm-hibvt.c
@@ -165,7 +165,7 @@ static int hibvt_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
return 0;
}

-static struct pwm_ops hibvt_pwm_ops = {
+static const struct pwm_ops hibvt_pwm_ops = {
.get_state = hibvt_pwm_get_state,
.apply = hibvt_pwm_apply,

--
1.9.1


2017-07-06 06:41:37

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH] pwm: pwm-hibvt: constify hibvt_pwm_ops

On Tue, Jun 13, 2017 at 03:26:41PM +0530, Arvind Yadav wrote:
> File size before:
> text data bss dec hex filename
> 1510 296 0 1806 70e drivers/pwm/pwm-hibvt.o
> File size After adding 'const':
> text data bss dec hex filename
> 1606 192 0 1798 706 drivers/pwm/pwm-hibvt.o
>
> Signed-off-by: Arvind Yadav <[email protected]>
> ---
> drivers/pwm/pwm-hibvt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thierry


Attachments:
(No filename) (527.00 B)
signature.asc (833.00 B)
Download all attachments