register_chrdev() is the old way for char device registration. register_chrdev_region or even alloc_chrdev_region should be used.
Have a look at the very good book Linux Device Driver, 3rd edition by Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman, available on line at http://lwn.net/Kernel/LDD3/
, especially chapter 3 for your question. Have fun !