Skip to content

Commit

Permalink
staging: iio: light: tsl2x7x constify attribute_group structures
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
simran singhal authored and Jonathan Cameron committed Apr 1, 2017
1 parent 4214dc1 commit d952b4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/light/tsl2x7x_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d952b4e

Please sign in to comment.