What are the specific cases where static allocation of major numbers are required(i.e the necessity to create device nodes in advance) ?
What are the specific cases where static allocation of major numbers are required(i.e the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Static allocation of major numbers is usually used for most common devices. A list of those devices can be found in Documentation/devices.txt within the kernel source tree.
If you’re developing a driver for your own use you can use static assigning as long as you use a number that appears to be unused. But if your driver will be deployed more widely picking a random number and assigning it like this can eventually cause conflicts, so it might be better to use dynamic allocation.
Linux Device Drivers, 3rd Edition