summaryrefslogtreecommitdiff
path: root/firmware/drivers/ata.c
diff options
context:
space:
mode:
authorBoris Gjenero <dreamlayers@rockbox.org>2011-11-08 23:29:25 +0000
committerBoris Gjenero <dreamlayers@rockbox.org>2011-11-08 23:29:25 +0000
commit32eb8275f4d1e2f0f7442113ffafdb5c8eedd7c3 (patch)
tree5c71dc1c52677f4cc61bf18ed2e5d652ffcade15 /firmware/drivers/ata.c
parent354015ef287ff484bf8f8e345102d8c661983805 (diff)
downloadrockbox-32eb8275f4d1e2f0f7442113ffafdb5c8eedd7c3.zip
rockbox-32eb8275f4d1e2f0f7442113ffafdb5c8eedd7c3.tar.gz
rockbox-32eb8275f4d1e2f0f7442113ffafdb5c8eedd7c3.tar.bz2
rockbox-32eb8275f4d1e2f0f7442113ffafdb5c8eedd7c3.tar.xz
Remove last_sleep when it's not needed because IDE power is never turned off.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30943 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/ata.c')
-rw-r--r--firmware/drivers/ata.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index baef669..0d82efb 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -861,7 +861,9 @@ void ata_spin(void)
static void ata_thread(void)
{
+#ifdef HAVE_ATA_POWER_OFF
static long last_sleep = 0;
+#endif
struct queue_event ev;
#ifdef ALLOW_USB_SPINDOWN
static bool usb_mode = false;
@@ -899,7 +901,9 @@ static void ata_thread(void)
}
mutex_lock(&ata_mtx);
ata_perform_sleep();
+#ifdef HAVE_ATA_POWER_OFF
last_sleep = current_tick;
+#endif
mutex_unlock(&ata_mtx);
}
}