Hello,
I am a newbie to the Linux kernel development and have a question regarding major number assignment.
I came across some information that in 2.6.x kernels , during boot up , the kernel creates the sysfs file hierarchy for every device that it finds attached. It then sends hotplug events for each of these new devices to udev which then reads the sysfs filesystem to create corresponding device nodes in /dev.
However , I also noticed that there are drivers which still use a static major number (defined in linux/major.h) e.g: in a call to
, the input driver uses INPUT_MAJOR (
Code:
/* #define INPUT_MAJOR 13 */
).
So , if the driver registers its own major number whereas udev creates a dev node with another major number , how is a driver associated with a particular device node ?