summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdoob.c
Commit message (Collapse)AuthorAgeFilesLines
* devfs: Drop dev_lseek_default()Andrey Smirnov2019-01-291-1/+0
| | | | | | | | | | | | | | | | | | | | | Only the following cdevs do not declare an .lseek() operation: - Console devices in common/console.c - Firmware framework in common/firmware.c - JTAG driver in drivers/misc/jtag.c - UBI in drivers/mtd/ubi/barebox.c Of those four, first two are marked DEVFS_IS_CHARACTER_DEV and implement only .write() operation and the last two don't implement anything but .ioctl(). While there's probably no meaningful way to use lseek() against any of those devices, there doesn't seem to be any harm in allowing it either. Change devfs_lseek() to ignore absense of .lseek() callback and drop dev_lseek_default() and all references to it in the codebase. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename file_operations -> cdev_operationsSascha Hauer2018-04-061-1/+1
| | | | | | | | Linux also has struct file_operations which are something different. Rename our file_operations to cdev_operations which better matches what we have. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* string: Fix (v)asprintf prototypesSascha Hauer2016-04-151-1/+1
| | | | | | | | | | Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: mtdoob device: change name to have the chip name firstSascha Hauer2016-02-091-1/+1
| | | | | | | | | | Normally all device files assoctiated to a mtd device begin with the chip name itself. Only the mtdoob device is an exception: it begins with the chip name without the index end ends with the index. Change the name to be like the other names, i.e. change nand_oob0 to nand0.oob. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: Make devname argument to add_mtd_device constSascha Hauer2015-06-291-1/+1
| | | | | | | add_mtd_device duplicates the string where necessary, so make it const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: Update internal API to support 64-bit device sizeDmitry Lavnikevich2014-03-121-1/+1
| | | | | | | | | | | | | | | | | | | MTD internal API presently uses 32-bit values to represent device size. This patch updates them to 64-bits but leaves the external API unchanged. In general, changing from 32-bit to 64-bit values cause little or no changes to the majority of the code with the following exceptions: - printk message formats; - division and modulus of 64-bit values (mtd_div_by_wb, mtd_div_by_eb may be used in some of such cases). Was tested on phyFLEX i.MX6. Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com> Signed-off-by: Grigory Milev <g.milev@sam-solutions.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: mtdoob: Do not create for partitionsSascha Hauer2014-02-261-1/+4
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: introduce mtd_read_oob and mtd_write_oobSascha Hauer2013-07-221-1/+1
| | | | | | Directly copied from the Kernel as of 3.11-rc1 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: rename mtd_read_oobSascha Hauer2013-07-221-2/+2
| | | | | | | | There is the same function name in the Kernel but with different semantics. Rename to avoid naming conflicts when we update the mtd support from the kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: rename MTD_OOB_* to MTD_OPS_*Sascha Hauer2013-07-221-1/+1
| | | | | | To sync with the Linux kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd oob: do not register oob device for devices without oobSascha Hauer2012-11-291-0/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: add private data to mtddev-hookAlexander Aring2012-09-031-1/+14
| | | | | | | | | 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>
* use loff_t for file offsetsSascha Hauer2012-06-301-1/+2
| | | | | | | This is a first step for 64bit file support: Make the file sizes/offsets 64bit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers/mtd: split mtd mtdoob devicesRobert Jarzmik2011-12-221-0/+97
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>