Add a check to verify ATA driver has been initialised in ata_sleepnow().

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11949 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2007-01-08 18:26:03 +00:00
parent 52bb5e1e63
commit a9121491cc

View file

@ -610,7 +610,7 @@ void ata_sleep(void)
void ata_sleepnow(void)
{
if (!spinup && !sleeping && !ata_mtx.locked)
if (!spinup && !sleeping && !ata_mtx.locked && initialized)
{
call_ata_idle_notifys(false);
ata_perform_sleep();