just use devfs (or whatever linux's equivalent is), instead of creating the devices manually.
Btw, ioctl is truly the worst syscall ever. It should really die.