summaryrefslogtreecommitdiff
path: root/drivers/media/rc/imon.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-09-05 15:07:50 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2017-10-04 21:25:53 +0300
commitc25895c7d6c957124ceb3b090b7eaa68b1d3bf54 (patch)
tree4183ff9ed6c70fc3481b3ea0d034ba45cd260b52 /drivers/media/rc/imon.c
parent771f87268e8cd0e50719eb20f0b613ec4b2a19ec (diff)
downloadlinux-c25895c7d6c957124ceb3b090b7eaa68b1d3bf54.tar.xz
[media] media: imon: make two const arrays static, reduces object code size
Don't populate the const arrays vfd_packet6 and fp_packet on the stack, instead make them static. Makes the object code smaller by over 600 bytes: Before: text data bss dec hex filename 43794 17920 1024 62738 f512 drivers/media/rc/imon.o After: text data bss dec hex filename 42994 18080 1024 62098 f292 drivers/media/rc/imon.o Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/rc/imon.c')
-rw-r--r--drivers/media/rc/imon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index 188cf1b4ebb1..b83ad6d483aa 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -943,7 +943,7 @@ static ssize_t vfd_write(struct file *file, const char __user *buf,
int seq;
int retval = 0;
struct imon_context *ictx;
- const unsigned char vfd_packet6[] = {
+ static const unsigned char vfd_packet6[] = {
0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF };
ictx = file->private_data;
@@ -2047,8 +2047,8 @@ static struct rc_dev *imon_init_rdev(struct imon_context *ictx)
{
struct rc_dev *rdev;
int ret;
- const unsigned char fp_packet[] = { 0x40, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x88 };
+ static const unsigned char fp_packet[] = {
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88 };
rdev = rc_allocate_device(ictx->dev_descr->flags & IMON_IR_RAW ?
RC_DRIVER_IR_RAW : RC_DRIVER_SCANCODE);