For the size_t type the format specifier %zu or %zx must be used.
See Documentation/printk-formats.txt in the kernel for details.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The mtdoob and mtdraw device don't clean up correctly.
Added a private data element to hold allocated memory.
Fix remove of mtdoob and mtdraw device.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
In the Kernel the mtd ioctls expect a pointer to the offset, whereas
barebox interprets the pointer itself as an offset. Since we want
to add 64bit support for file sizes a pointer may not be sufficient,
so align with the kernel and convert it to a pointer to the offset.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Support added for ioctl of ECCGETSTATS and MEMGETREGIONINFO.
Fix default handling in core.c to return -EINVAL, if request
was unknown.
Signed-off-by: Alexander Aring <a.aring@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
introduced in commit f76ad819e4
drivers/mtd: cosmetic changes
it's supposed to the invert of the writesize - 1
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Split /dev/mtd and /dev/mtdoob devices.
Remove from mtd structure the mtdoob character device.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
If multiple MTD devices were registered, an exception
occured, as they all wanted id 0. Let the driver code choose
the device number dynamically.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Change NAND_WRITE into MTD_WRITE.
Change "page_shift" references in the core, which are purely
NAND, into mtd->writesize which is MTD generic.
Rename all "info" (struct mtd_info) into "mtd".
Also provide a parameter to add_mtd_device() so that legacy
nand devices still appear as nand<N>.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Fix whitespace, replace all debug() by dev_dbg(), and fix
line length to 80 characters.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>