Commit e26ae366 authored by Colin Ian King's avatar Colin Ian King Committed by Lee Jones

mfd: rtsx: Make arrays depth and cd_mask static const

Don't populate the arrays depath and cd_mask on the stack but make
them static const.  Makes the object code smaller:

   text    data     bss     dec     hex filename
  25413    7216     448   33077    8135 drivers/mfd/rtsx_pcr.o

   text    data     bss     dec     hex filename
  25151    7360     448   32959    80bf drivers/mfd/rtsx_pcr.o
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent ff827cf5
...@@ -644,7 +644,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock, ...@@ -644,7 +644,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
{ {
int err, clk; int err, clk;
u8 n, clk_divider, mcu_cnt, div; u8 n, clk_divider, mcu_cnt, div;
u8 depth[] = { static const u8 depth[] = {
[RTSX_SSC_DEPTH_4M] = SSC_DEPTH_4M, [RTSX_SSC_DEPTH_4M] = SSC_DEPTH_4M,
[RTSX_SSC_DEPTH_2M] = SSC_DEPTH_2M, [RTSX_SSC_DEPTH_2M] = SSC_DEPTH_2M,
[RTSX_SSC_DEPTH_1M] = SSC_DEPTH_1M, [RTSX_SSC_DEPTH_1M] = SSC_DEPTH_1M,
...@@ -768,7 +768,7 @@ EXPORT_SYMBOL_GPL(rtsx_pci_card_power_off); ...@@ -768,7 +768,7 @@ EXPORT_SYMBOL_GPL(rtsx_pci_card_power_off);
int rtsx_pci_card_exclusive_check(struct rtsx_pcr *pcr, int card) int rtsx_pci_card_exclusive_check(struct rtsx_pcr *pcr, int card)
{ {
unsigned int cd_mask[] = { static const unsigned int cd_mask[] = {
[RTSX_SD_CARD] = SD_EXIST, [RTSX_SD_CARD] = SD_EXIST,
[RTSX_MS_CARD] = MS_EXIST [RTSX_MS_CARD] = MS_EXIST
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment