[PATCH] mtd: mtdraw: drop ioctl callback for mtdraw device
Robert Jarzmik
robert.jarzmik at free.fr
Wed Dec 4 16:28:43 EST 2013
Sascha Hauer <s.hauer at pengutronix.de> writes:
> On Tue, Dec 03, 2013 at 11:04:45PM +0100, Robert Jarzmik wrote:
> For MEMGETINFO we can directly call into _mtd_ioctl(), but for
> MEM[SG]ETBADBLOCK the offsets would have to be corrected first. Is this
> worth the effort? Otherwise we could do something like:
>
> int mtdraw_ioctl(struct cdev *cdev, int request, void *buf)
> {
> struct mtd_info *mtd = to_mtd(cdev);
>
> switch (request) {
> case MEMGETINFO:
> return mtd_memgetinfo(mtd, buf);
> default:
> return -EINVAL;
> }
> }
Yes, that looks like the right thing to do.
I don't think MEM[GS]ETBADBLOCK are used anywhere at this time for raw
devices. And I'm not convinced it is worth the effort just as you.
And let's be pragmatic : is somebody needs the badblock ioctls, he'll add them
:) By now, I'm happy with your patch.
Cheers.
--
Robert
More information about the barebox
mailing list