lkml.org 
[lkml]   [2017]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [media] ov2640: make array reset_seq static, reduces object code size
Date
From: Colin Ian King <colin.king@canonical.com>

Don't populate the array reset_seq on the stack, instead make it
static. Makes the object code smaller by over 50 bytes:

Before:
text data bss dec hex filename
11737 6000 64 17801 4589 drivers/media/i2c/ov2640.o

After:
text data bss dec hex filename
11582 6096 64 17742 454e drivers/media/i2c/ov2640.o

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/media/i2c/ov2640.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c
index e6d0c1f64f0b..c290fbdc2336 100644
--- a/drivers/media/i2c/ov2640.c
+++ b/drivers/media/i2c/ov2640.c
@@ -685,7 +685,7 @@ static int ov2640_mask_set(struct i2c_client *client,
static int ov2640_reset(struct i2c_client *client)
{
int ret;
- const struct regval_list reset_seq[] = {
+ static const struct regval_list reset_seq[] = {
{BANK_SEL, BANK_SEL_SENS},
{COM7, COM7_SRST},
ENDMARKER,
--
2.14.1
\
 
 \ /
  Last update: 2017-09-12 11:11    [W:0.032 / U:0.072 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site