Browse Source

mmc: rtsx_usb_sdmmc: make array 'width' static const

array width is on-stack and not modified and should be
made static const.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Colin Ian King 8 years ago
parent
commit
b388dc3c9a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/mmc/host/rtsx_usb_sdmmc.c

+ 1 - 1
drivers/mmc/host/rtsx_usb_sdmmc.c

@@ -909,7 +909,7 @@ static int sd_set_bus_width(struct rtsx_usb_sdmmc *host,
 		unsigned char bus_width)
 		unsigned char bus_width)
 {
 {
 	int err = 0;
 	int err = 0;
-	u8 width[] = {
+	static const u8 width[] = {
 		[MMC_BUS_WIDTH_1] = SD_BUS_WIDTH_1BIT,
 		[MMC_BUS_WIDTH_1] = SD_BUS_WIDTH_1BIT,
 		[MMC_BUS_WIDTH_4] = SD_BUS_WIDTH_4BIT,
 		[MMC_BUS_WIDTH_4] = SD_BUS_WIDTH_4BIT,
 		[MMC_BUS_WIDTH_8] = SD_BUS_WIDTH_8BIT,
 		[MMC_BUS_WIDTH_8] = SD_BUS_WIDTH_8BIT,