Skip to content

Commit cec72c9

Browse files
nongxiaomingBernardXiong
authored andcommitted
[components][sdio] fix compile warning and optimized code.
1 parent 7bbf260 commit cec72c9

File tree

1 file changed

+1
-6
lines changed
  • components/drivers/sdio

1 file changed

+1
-6
lines changed

components/drivers/sdio/mmc.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,6 @@ static int mmc_select_bus_width(struct rt_mmcsd_card *card, rt_uint8_t *ext_csd)
294294
EXT_CSD_BUS_WIDTH_4,
295295
EXT_CSD_BUS_WIDTH_1
296296
};
297-
rt_uint32_t bus_widths[] = {
298-
MMCSD_BUS_WIDTH_8,
299-
MMCSD_BUS_WIDTH_4,
300-
MMCSD_BUS_WIDTH_1
301-
};
302297
struct rt_mmcsd_host *host = card->host;
303298
unsigned idx, trys, bus_width = 0;
304299
int err = 0;
@@ -312,7 +307,7 @@ static int mmc_select_bus_width(struct rt_mmcsd_card *card, rt_uint8_t *ext_csd)
312307
* the supported bus width or compare the ext csd values of current
313308
* bus width and ext csd values of 1 bit mode read earlier.
314309
*/
315-
for (idx = 0; idx < sizeof(bus_widths)/sizeof(rt_uint32_t); idx++) {
310+
for (idx = 0; idx < sizeof(ext_csd_bits)/sizeof(rt_uint32_t); idx++) {
316311
/*
317312
* Host is capable of 8bit transfer, then switch
318313
* the device to work in 8bit transfer mode. If the

0 commit comments

Comments
 (0)