summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/em28xx/em28xx-input.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2018-03-01 10:34:34 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-03-06 04:49:18 -0500
commit0108ae7fd2972707cde3fafa6fec555c50c64e28 (patch)
treeb5f8261196f441b8fc504deaadccdfe5799783ec /drivers/media/usb/em28xx/em28xx-input.c
parentaa62980be47e1fe1f40cbaf0a80589193faa7ab9 (diff)
downloadlinux-0108ae7fd2972707cde3fafa6fec555c50c64e28.tar.bz2
media: em28xx: constify most static structs
There are several em28xx static structs that can now be constified. That caused a significant reduction at data segment: Before: text data bss dec hex filename 85017 59588 576 145181 2371d drivers/media/usb/em28xx/em28xx.o After: text data bss dec hex filename 112345 32292 576 145213 2373d drivers/media/usb/em28xx/em28xx.o Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-input.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-input.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c
index 046223de1e91..270cd68df4a2 100644
--- a/drivers/media/usb/em28xx/em28xx-input.c
+++ b/drivers/media/usb/em28xx/em28xx-input.c
@@ -515,7 +515,8 @@ static void em28xx_query_buttons(struct work_struct *work)
j = 0;
while (dev->board.buttons[j].role >= 0 &&
dev->board.buttons[j].role < EM28XX_NUM_BUTTON_ROLES) {
- struct em28xx_button *button = &dev->board.buttons[j];
+ const struct em28xx_button *button = &dev->board.buttons[j];
+
/* Check if button uses the current address */
if (button->reg_r != dev->button_polling_addresses[i]) {
j++;
@@ -618,7 +619,8 @@ static void em28xx_init_buttons(struct em28xx *dev)
dev->button_polling_interval = EM28XX_BUTTONS_DEBOUNCED_QUERY_INTERVAL;
while (dev->board.buttons[i].role >= 0 &&
dev->board.buttons[i].role < EM28XX_NUM_BUTTON_ROLES) {
- struct em28xx_button *button = &dev->board.buttons[i];
+ const struct em28xx_button *button = &dev->board.buttons[i];
+
/* Check if polling address is already on the list */
addr_new = true;
for (j = 0; j < dev->num_button_polling_addresses; j++) {