How would the driver differentiate between .compat_ioctl == NULL being a
case where it should fail because there is no translation, or a case
where it should use the compatible .ioctl? Maybe there should be an
extra flag like use_compat_ioctl. So:
.use_compat_ioctl = 1;
.ioctl = my_ioctl;
.compat_ioctl = my_compat_ioctl;
Means use my_compat_ioctl() for translation. And just:
.use_compat_ioctl = 1;
.ioctl = my_ioctl;
Means that our standard my_ioctl is 32/64 compatible.
This would also solve the current problem where a module that is
compiled with compat ioctl's using register_ioctl32_conversion() is not
usable on a kernel compiled without CONFIG_COMPAT, even though it very
well should be.
-- Debian - http://www.debian.org/ Linux 1394 - http://www.linux1394.org/ Subversion - http://subversion.tigris.org/ Deqo - http://www.deqo.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/