> > @@ -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/ |