]> err.no Git - linux-2.6/commitdiff
[PATCH] cfi: init wait queue in chip struct
authorSimon Vogl <simon.vogl@researchstudios.at>
Fri, 24 Feb 2006 21:04:09 +0000 (13:04 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 24 Feb 2006 22:31:37 +0000 (14:31 -0800)
Fix a kernel oops for Intel P30 flashes, where the wait queue head was not
initialized for the flchip struct, which in turn caused a crash at the
first read operation.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/mtd/chips/cfi_cmdset_0001.c

index ded2c33f5b853adc256b61c86efe15336a9b414b..1c074d63ff3af865d52acf29d59aa1be824c41bf 100644 (file)
@@ -408,6 +408,7 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary)
                cfi->chips[i].buffer_write_time = 1<<cfi->cfiq->BufWriteTimeoutTyp;
                cfi->chips[i].erase_time = 1<<cfi->cfiq->BlockEraseTimeoutTyp;
                cfi->chips[i].ref_point_counter = 0;
+               init_waitqueue_head(&(cfi->chips[i].wq));
        }
 
        map->fldrv = &cfi_intelext_chipdrv;