Major number changes after each insmod



Hello all,

I'm working on my first 'real' driver for linux (I've done libusb and other
usermode drivers before) and I have some basic questions.

First in the init of the module, I do:
rc = alloc_chrdev_region(&dev,minor,nr_devs,"MyDev");
major=MAJOR(dev);
But the value of dev changes each time I do a new rmmod/insmod: 254, 253,
etc...
So how can match it with mknod ?
mknod /dev/MyDev c 254 0
Right now I need to do it manually each time.
Can't I fix the major number in my driver initialization ?


PS: with usenet getting increasingly sidelined, what is a good forum to ask
about general linux driver development ?
--
Guillaume Dargaud
http://www.gdargaud.net/
.