1
0
Fork 0
forked from len0rd/rockbox

imx233: fix compilation of sdmmc for non-mmc targets

Change-Id: I0f61d0ca8e385fbfeaba53b81c3320b24aa61ab9
This commit is contained in:
Amaury Pouly 2012-08-30 17:25:25 +02:00
parent 722e24a76a
commit 7ff78c4ccb

View file

@ -647,6 +647,7 @@ static void sdmmc_thread(void)
{ {
struct queue_event ev; struct queue_event ev;
bool idle_notified = false; bool idle_notified = false;
int timeout = 0;
while (1) while (1)
{ {
@ -706,8 +707,13 @@ static void sdmmc_thread(void)
} }
#endif #endif
case SYS_TIMEOUT: case SYS_TIMEOUT:
if(TIME_BEFORE(current_tick, sd_last_disk_activity()+(3*HZ)) || #if CONFIG_STORAGE & STORAGE_SD
TIME_BEFORE(current_tick, mmc_last_disk_activity()+(3*HZ))) timeout = MAX(timeout, sd_last_disk_activity()+(3*HZ));
#endif
#if CONFIG_STORAGE & STORAGE_MMC
timeout = MAX(timeout, mmc_last_disk_activity()+(3*HZ));
#endif
if(TIME_BEFORE(current_tick, timeout))
{ {
idle_notified = false; idle_notified = false;
} }