Messages in this thread | | | From | Bret Indrelee <> | Subject | RE: Request for comments (kdev_t and friends...) | Date | Sat, 27 Nov 1999 15:33:53 -0600 |
| |
Linus Torvalds wrote: > > Further, major and minor don't make much sense either anymore. Major > > should indicate a device type, with minor indicating an > instance. But now > > there are multiple devices within a major (misc, mem) and > devices that > > span majors (tty, scsi). So the terms are more or less > arbitrary. So most > > of the kernel outside drivers themselves should treat > device handles as > > opaque. > > The major/minor stuff should never be used in a perfect > world, except for > the initial lookup. After that, you would just have "index within this > controller" or something, and that depends on the actual hardware.
What about drivers that use the minor number to indicate instance number or special modes of operation?
The major number is just something that the system uses to convert from the user concept of 'open the device at this inode' into a table lookup. Device drivers shouldn't care about their major number.
The minor number for some devices has been and continues to indicate operating mode for certain devices.
-Bret
------------------------------------------------------------- SBS Technologies, Connectivity Products ... solutions for real-time connectivity
Bret Indrelee, Engineer SBS Technologies, Inc., Connectivity Products 1284 Corporate Center Drive, St. Paul MN 55121 Direct: (651) 905-4731 Main: (651) 905-4700 Fax: (651) 905-4701 E-mail: bindrelee@sbs-cp.com http://www.sbs.com -------------------------------------------------------------
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |