diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c index 32d0013574..17b37821b2 100644 --- a/firmware/target/arm/imx233/sdmmc-imx233.c +++ b/firmware/target/arm/imx233/sdmmc-imx233.c @@ -502,13 +502,6 @@ static int __xfer_sectors(int drive, unsigned long start, int count, void *buf, return ret; } -static void do_led(int delta) -{ - static int level = 0; - level += delta; - led(level > 0); -} - static int transfer_sectors(int drive, unsigned long start, int count, void *buf, bool read) { int ret = 0; @@ -520,7 +513,7 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf mutex_lock(&mutex[drive]); /* update led status */ - do_led(1); + led(true); /* for SD cards, init if necessary */ #if CONFIG_STORAGE & STORAGE_SD @@ -553,7 +546,7 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf goto Ldeselect; /** - * NOTE: we need to make sure dma transfers are aligned. This handled + * NOTE: we need to make sure dma transfers are aligned. This is handled * differently for read and write transfers. We do not repeat it each * time but it should be noted that all transfers are limited by * IMX233_MAX_SINGLE_DMA_XFER_SIZE and thus need to be split if needed. @@ -616,7 +609,7 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf ret = -23; Lend: /* update led status */ - do_led(-1); + led(false); /* release per-drive mutex */ mutex_unlock(&mutex[drive]); return ret;