Skip to content

Commit 298e082

Browse files
ColinIanKinghdeller
authored andcommitted
fbdev: kyro: make some const read-only arrays static and reduce type size
Don't populate the const read-only arrays on the stack but instead make them static const. Use smaller types to use less storage for the arrays. Also makes the object code a little smaller. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent 933ab3a commit 298e082

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/video/fbdev/kyro/STG4000InitDevice.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ volatile u32 i,count=0; \
8383
static u32 InitSDRAMRegisters(volatile STG4000REG __iomem *pSTGReg,
8484
u32 dwSubSysID, u32 dwRevID)
8585
{
86-
u32 adwSDRAMArgCfg0[] = { 0xa0, 0x80, 0xa0, 0xa0, 0xa0 };
87-
u32 adwSDRAMCfg1[] = { 0x8732, 0x8732, 0xa732, 0xa732, 0x8732 };
88-
u32 adwSDRAMCfg2[] = { 0x87d2, 0x87d2, 0xa7d2, 0x87d2, 0xa7d2 };
89-
u32 adwSDRAMRsh[] = { 36, 39, 40 };
90-
u32 adwChipSpeed[] = { 110, 120, 125 };
86+
static const u8 adwSDRAMArgCfg0[] = { 0xa0, 0x80, 0xa0, 0xa0, 0xa0 };
87+
static const u16 adwSDRAMCfg1[] = { 0x8732, 0x8732, 0xa732, 0xa732, 0x8732 };
88+
static const u16 adwSDRAMCfg2[] = { 0x87d2, 0x87d2, 0xa7d2, 0x87d2, 0xa7d2 };
89+
static const u8 adwSDRAMRsh[] = { 36, 39, 40 };
90+
static const u8 adwChipSpeed[] = { 110, 120, 125 };
9191
u32 dwMemTypeIdx;
9292
u32 dwChipSpeedIdx;
9393

0 commit comments

Comments
 (0)