mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 18:06:48 +07:00
media: tuners: mxl5005s: make arrays static const, reduces object code size
Don't populate the arrays RegAddr on the stack, instead make them static const. Makes the object code smaller by over 980 bytes: Before: text data bss dec hex filename 64923 304 0 65227 fecb drivers/media/tuners/mxl5005s.o After: text data bss dec hex filename 63779 464 0 64243 faf3 drivers/media/tuners/mxl5005s.o Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
f54fb924a9
commit
06ac35e52b
@ -3591,10 +3591,11 @@ static u16 MXL_GetInitRegister(struct dvb_frontend *fe, u8 *RegNum,
|
|||||||
u16 status = 0;
|
u16 status = 0;
|
||||||
int i ;
|
int i ;
|
||||||
|
|
||||||
u8 RegAddr[] = {
|
static const u8 RegAddr[] = {
|
||||||
11, 12, 13, 22, 32, 43, 44, 53, 56, 59, 73,
|
11, 12, 13, 22, 32, 43, 44, 53, 56, 59, 73,
|
||||||
76, 77, 91, 134, 135, 137, 147,
|
76, 77, 91, 134, 135, 137, 147,
|
||||||
156, 166, 167, 168, 25 };
|
156, 166, 167, 168, 25
|
||||||
|
};
|
||||||
|
|
||||||
*count = ARRAY_SIZE(RegAddr);
|
*count = ARRAY_SIZE(RegAddr);
|
||||||
|
|
||||||
@ -3616,11 +3617,15 @@ static u16 MXL_GetCHRegister(struct dvb_frontend *fe, u8 *RegNum, u8 *RegVal,
|
|||||||
|
|
||||||
/* add 77, 166, 167, 168 register for 2.6.12 */
|
/* add 77, 166, 167, 168 register for 2.6.12 */
|
||||||
#ifdef _MXL_PRODUCTION
|
#ifdef _MXL_PRODUCTION
|
||||||
u8 RegAddr[] = {14, 15, 16, 17, 22, 43, 65, 68, 69, 70, 73, 92, 93, 106,
|
static const u8 RegAddr[] = {
|
||||||
107, 108, 109, 110, 111, 112, 136, 138, 149, 77, 166, 167, 168 } ;
|
14, 15, 16, 17, 22, 43, 65, 68, 69, 70, 73, 92, 93, 106,
|
||||||
|
107, 108, 109, 110, 111, 112, 136, 138, 149, 77, 166, 167, 168
|
||||||
|
};
|
||||||
#else
|
#else
|
||||||
u8 RegAddr[] = {14, 15, 16, 17, 22, 43, 68, 69, 70, 73, 92, 93, 106,
|
static const u8 RegAddr[] = {
|
||||||
107, 108, 109, 110, 111, 112, 136, 138, 149, 77, 166, 167, 168 } ;
|
14, 15, 16, 17, 22, 43, 68, 69, 70, 73, 92, 93, 106,
|
||||||
|
107, 108, 109, 110, 111, 112, 136, 138, 149, 77, 166, 167, 168
|
||||||
|
};
|
||||||
/*
|
/*
|
||||||
u8 RegAddr[171];
|
u8 RegAddr[171];
|
||||||
for (i = 0; i <= 170; i++)
|
for (i = 0; i <= 170; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user