[PATCH] mtd: mtdraw: drop ioctl callback for mtdraw device
robert.jarzmik at free.fr
Tue Dec 3 17:04:45 EST 2013
Sascha Hauer <s.hauer at pengutronix.de> writes:
> Do not call mtd_ioctl for mtdraw devices. mtd_ioctl will derefence
> the priv pointer to a struct mtd_info whereas with mtdraw devices it will be
> a struct mtdraw pointer. We do not need ioctls for mtdraw devices, so drop
> it instead of fixing it.
Very true for the fix.
As to whether we need ioctls for raw mtd devices, we're loosing bad block
operations and memgetinfo.
Unfortunately that's a flaw with my split of core.c/mtdraw.c. The complete fix
would be to have mtd_ioctl split into :
- mtd_ioctl : would call
_mtd_ioctl(struct mtd_info *info, int request, void *buf)
- _mtd_ioctl : current code of ioctl handling
And add :
- mtdraw_ioctl: would call _mtd_ioctl()
For the time being your patch is perfectly fine. Do you want me to add the split
+ mtdraw_ioctl() ? That's not a too big amount of work.
More information about the barebox