From 32eb8275f4d1e2f0f7442113ffafdb5c8eedd7c3 Mon Sep 17 00:00:00 2001 From: Boris Gjenero Date: Tue, 8 Nov 2011 23:29:25 +0000 Subject: 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 --- firmware/drivers/ata.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index baef6691d4..0d82efb07f 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); } } -- cgit v1.2.3