Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[powerpc.git] / drivers / mtd / chips / cfi_cmdset_0001.c
index 11de545..f69184a 100644 (file)
@@ -1086,7 +1086,7 @@ static int inval_cache_and_wait_for_operation(
                }
                spin_lock(chip->mutex);
 
-               if (chip->state != chip_state) {
+               while (chip->state != chip_state) {
                        /* Someone's suspended the operation: sleep */
                        DECLARE_WAITQUEUE(wait, current);
                        set_current_state(TASK_UNINTERRUPTIBLE);