[PATCH] [MTD] Document erase interface.

Josh Boyer jwboyer at linux.vnet.ibm.com
Fri Sep 21 10:14:41 EDT 2007


On Fri, 21 Sep 2007 15:41:44 +0200
Jörn Engel <joern at logfs.org> wrote:

> Document mtd erase interface.
> 
> Signed-off-by: Jörn Engel <joern at logfs.org>
> ---
> 
>  include/linux/mtd/mtd.h |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> --- linux-2.6.21logfs/include/linux/mtd/mtd.h~mtd_erase_documentation	2007-05-31 13:41:41.000000000 +0200
> +++ linux-2.6.21logfs/include/linux/mtd/mtd.h	2007-09-21 15:43:18.000000000 +0200
> @@ -139,6 +139,13 @@ struct mtd_info {
>  	/* This really shouldn't be here. It can go away in 2.5 */
>  	u_int32_t bank_size;
>  
> +	/*
> +	 * 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);

If you're going to go to the trouble, maybe doing it in KernelDoc style
would be better.

josh



More information about the linux-mtd mailing list