function of major/minor device number

hz hanks hankshz at gmail.com
Sun Feb 12 03:57:17 EST 2012


Hi, all

I have a question about major/minor device number. I know that one can
use int register_chrdev_region(dev_t from, unsigned count, const char
*name); to register a driver with a unique pair of major/minor device
number. But what's the difference between two drivers: in one case
they have same major device number but different minor device number;
on another case they have different major device number but same minor
device number. When I searched the Internet, it said that major device
number is to identify the driver while the minor device number is to
identify specific hardware. But I'm still confused because it seems
legal to share the major device number with different drivers.

Please help me!Thank you!



More information about the Kernelnewbies mailing list