[PATCH] mtd: add documentation about locking context of MTD API

Robert Jarzmik robert.jarzmik at free.fr
Mon Mar 19 18:51:38 EDT 2012

Richard Weinberger <richard at nod.at> writes:

> Am 19.03.2012 23:26, schrieb Robert Jarzmik:
>> Add a comment to mtd header for MTD drivers writters, so that they
>> know that each function in the MTD API, ie. in the mtd_info
>> structure, is called in a sleeping context.
> Why do we need this comment?
Because I was asked to, in [1].

> "sleeping" context isn't special, it's the default.
> atomic would be...
Ah, well, maybe. From what I've seen in the usb drivers area, portions of code
are called from interrupts, through hooks. As a driver writer, I'm always
interested to know whether I can msleep() or not.



[1] http://lists.infradead.org/pipermail/linux-mtd/2012-March/040236.html

More information about the linux-mtd mailing list