History

mtd: adapt misleading comment in mtd_oob_ops structure

A comment in the kernel doc of the mtd_oob_ops structure tells that it is not possible to write more than one page with OOB. This is actually true for only a few MTD devices like 'onenand' but it is definitely not a general limitation. While this would benefit to be handled elsewhere either by the MTD layer or by the limited drivers, let's update this comment to reflect the reality.

Miquel Raynal committed 8 years ago

Commit d70420b1 parent a8222a81 file · +5 −3Browse files

Unified · Split

include/linux/mtd/mtd.h+5−3
@@ -67,9 +67,11 @@ struct mtd_erase_region_info { · 66 unmodified lines
67 * @datbuf: data buffer - if NULL only oob data are read/written67 * @datbuf: data buffer - if NULL only oob data are read/written
68 * @oobbuf: oob data buffer68 * @oobbuf: oob data buffer
69 *69 *
70 * Note, it is allowed to read more than one OOB area at one go, but not write.70 * Note, some MTD drivers do not allow you to write more than one OOB area at
71 * The interface assumes that the OOB write requests program only one page's71 * one go. If you try to do that on such an MTD device, -EINVAL will be
72 * OOB area.72 * returned. If you want to make your implementation portable on all kind of MTD
73 * devices you should split the write request into several sub-requests when the
74 * request crosses a page boundary.
73 */75 */
74struct mtd_oob_ops {76struct mtd_oob_ops {
75 unsigned int mode;77 unsigned int mode;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t