[RFC 04/10] devfs & mtd: add MEMERASE ioctl support
Wolfram Sang
w.sang at pengutronix.de
Sun Dec 9 14:36:50 EST 2012
> > @@ -137,6 +168,9 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
> > dev_dbg(cdev->dev, "MEMSETBADBLOCK: 0x%08llx\n", *offset);
> > ret = mtd->block_markbad(mtd, *offset);
> > break;
> > + case MEMERASE:
> > + ret = mtd_erase(cdev, ei->length, ei->start + cdev->offset);
> > + break;
>
> Please check this compiles with CONFIG_MTD_WRITE disabled.
It does, since I move mtd_erase to the front. The upper block and
mtd_erase are both protected by MTD_WRITE.
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20121209/a816270e/attachment.sig>
More information about the barebox
mailing list