driver x_open,x_release work, x_ioctl,x_write don't

Using RedHat 5.0 and following KHG I performed the following steps in developing a driver 'x':
1) created x.o with gcc -O -DMODULE -D__KERNEL__
2) created /dev/x crw-r--r-- 126 0
3) insmod ./x.o
4) lsmod listed it but ksyms did not
5) user root: fildef = open('/dev.x',O_RDWR); (fildef = 17)
6) user root:ioctl(fildef,_IOW(126,1,sizeof(daud)),(int)&daud)
returns -1 as well as does all other ioctl's and write's
I try from user app and do not print "printk's".

7) rmmod removes it OK. It seems that 'open' and 'release'
are the only functions that work (perform as expected and
"printk's" work).