mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: iio: light: constify attribute_group structures
@ 2017-04-01  2:28 simran singhal
  2017-04-01 10:41 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: simran singhal @ 2017-04-01  2:28 UTC (permalink / raw)
  To: jic23
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Greg Kroah-Hartman, linux-iio, devel, linux-kernel

As the event_attrs field of iio_info structures is constant, so these
attribute_group structures can also be declared constant.

File size before:
   text	   data	    bss	    dec	    hex	filename
  15064	   1528	      0	  16592	   40d0
drivers/staging/iio/light/tsl2x7x_core.o

File size after:
   text	   data	    bss	    dec	    hex	filename
  15192	   1400	      0	  16592	   40d0
drivers/staging/iio/light/tsl2x7x_core.o

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
 drivers/staging/iio/light/tsl2x7x_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c
index 0490c1d..9a0046a 100644
--- a/drivers/staging/iio/light/tsl2x7x_core.c
+++ b/drivers/staging/iio/light/tsl2x7x_core.c
@@ -1676,7 +1676,7 @@ static const struct attribute_group tsl2X7X_device_attr_group_tbl[] = {
 	},
 };
 
-static struct attribute_group tsl2X7X_event_attr_group_tbl[] = {
+static const struct attribute_group tsl2X7X_event_attr_group_tbl[] = {
 	[ALS] = {
 		.attrs = tsl2X7X_ALS_event_attrs,
 		.name = "events",
-- 
2.7.4

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

end of thread, other threads:[~2017-04-01 10:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-01  2:28 [PATCH] staging: iio: light: constify attribute_group structures simran singhal
2017-04-01 10:41 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®