diff options
| author | Amaury Pouly <amaury.pouly@gmail.com> | 2012-12-16 12:05:25 +0100 |
|---|---|---|
| committer | Amaury Pouly <amaury.pouly@gmail.com> | 2012-12-16 21:28:41 +0100 |
| commit | e3f45226bdb7a12067df93a0b2b0e1705d80cbbe (patch) | |
| tree | 05163d76bc9c7c19bbcb9f690ef73c0fb029b434 | |
| parent | dac6dbc0139674c70b3c004600578c6b0f82fc21 (diff) | |
| download | rockbox-e3f45226bdb7a12067df93a0b2b0e1705d80cbbe.zip rockbox-e3f45226bdb7a12067df93a0b2b0e1705d80cbbe.tar.gz rockbox-e3f45226bdb7a12067df93a0b2b0e1705d80cbbe.tar.bz2 rockbox-e3f45226bdb7a12067df93a0b2b0e1705d80cbbe.tar.xz | |
imx233: simplify sdmmc led handling, fix typo
Change-Id: Iffbb05afd41bd0accfac9c127ea3a26fd33f1387
| -rw-r--r-- | firmware/target/arm/imx233/sdmmc-imx233.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c index 32d0013..17b3782 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; |