Results 1 to 2 of 2
hi guys,
For registering a driver into kernel i am using "register_chrdev" with major number & file operations structure(character driver i2c based)
Ques: what will happen if i put major ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-14-2007 #1Just Joined!
- Join Date
- Aug 2006
- Location
- india
- Posts
- 57
major number for register_driver
hi guys,
For registering a driver into kernel i am using "register_chrdev" with major number & file operations structure(character driver i2c based)
Ques: what will happen if i put major number=0
will kernel allocate any major number then, if so how to find what is the major number kernel allocated.
- 03-14-2007 #2Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
The function register_chrdev returns the major number of the registered device so you can print out the number with printk.
You can also read it from /proc/devices.
Regards


Reply With Quote
