X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmtd%2Fchips%2Fcfi_cmdset_0001.c;h=c1e3536c21476624409ae2d6e6d4247254280925;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=e71624edb2aa75a9df4a2777382555648b6ba659;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index e71624edb..c1e3536c2 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -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. */