Reading through all the books/articles/tutorials/examples on character device drivers I could find, they all cover how to acquire a major number in my driver code and all suggest that I do so dynamically by invoking alloc_chrdev_region(). To make the actual device node, they all then tell me to invoke mknod outside my driver code either manually or in a script. One reference wants my driver to print the major number. Another wants me to use awk on /proc/devices to find the major number. There is mention of the function mknod(), but it appears to be intended for use in userland code.
I'm obviously missing something since I don't understand why there isn't a way for my driver to be self contained, i.e, I do modprobe my_driver and end up with, say, /dev/my_driver created without having to do anything else.