freemyipod r300 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r299‎ | r300 | r301 >
Date:19:24, 1 December 2010
Author:theseven
Status:new
Tags:
Comment:
emBIOS: iPod Nano 2G NAND driver: Avoid trying to power down during NAND accesses
Modified paths:
  • /embios/trunk/target/ipodnano2g/nand.c (modified) (history)

Diff [purge]

Index: embios/trunk/target/ipodnano2g/nand.c
@@ -739,8 +739,10 @@
740740 {
741741 while (1)
742742 {
 743+ mutex_lock(&nand_mtx, TIMEOUT_BLOCK);
743744 if (TIME_AFTER(USEC_TIMER, nand_last_activity_value + 200000) && nand_powered)
744745 nand_power_down();
 746+ mutex_unlock(&nand_mtx);
745747 sleep(100000);
746748 }
747749 }