[MTD] Document erase interface.
authorJörn Engel <joern@logfs.org>
Fri, 21 Sep 2007 13:41:44 +0000 (15:41 +0200)
committerDavid Woodhouse <dwmw2@infradead.org>
Fri, 21 Sep 2007 13:48:33 +0000 (14:48 +0100)
Document mtd erase interface.

Signed-off-by: Jörn Engel <joern@logfs.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
include/linux/mtd/mtd.h

index fd64ccfbce02874fd2600b79dc02d84767bde7ae..783fc983417c9786c8d99eecca5dd19a36e4895d 100644 (file)
@@ -133,6 +133,13 @@ struct mtd_info {
        int numeraseregions;
        struct mtd_erase_region_info *eraseregions;
 
+       /*
+        * Erase is an asynchronous operation.  Device drivers are supposed
+        * to call instr->callback() whenever the operation completes, even
+        * if it completes with a failure.
+        * Callers are supposed to pass a callback function and wait for it
+        * to be called before writing to the block.
+        */
        int (*erase) (struct mtd_info *mtd, struct erase_info *instr);
 
        /* This stuff for eXecute-In-Place */