vserver 1.9.3
[linux-2.6.git] / drivers / mtd / chips / cfi_cmdset_0001.c
index e71624e..c1e3536 100644 (file)
@@ -603,6 +603,8 @@ static void put_chip(struct map_info *map, struct flchip *chip, unsigned long ad
                                }
                                spin_unlock(&shared->lock);
                        }
+               } else {
+                       spin_unlock(&shared->lock);
                }
        }
 
@@ -1437,8 +1439,7 @@ static int do_erase_oneblock(struct map_info *map, struct flchip *chip,
 
        spin_unlock(chip->mutex);
        INVALIDATE_CACHED_RANGE(map, adr, len);
-       set_current_state(TASK_UNINTERRUPTIBLE);
-       schedule_timeout((chip->erase_time*HZ)/(2*1000));
+       msleep(chip->erase_time / 2);
        spin_lock(chip->mutex);
 
        /* FIXME. Use a timer to check this, and return immediately. */