The old CardBus interface was set up so that a driver's attach() entry
point returned a linked list of device descriptors, of the form:
struct dev_node_t {
char dev_name[DEV_NAME_LEN];
u_short major, minor;
struct dev_node_t *next;
}
and this information was bounced out to user space. Drivers would not
return every major/minor instance; they would return more or less one
per physical device, and let user space construct the rest. A dual
network interface would return two dev_node_t structures; a hard drive
with N partitions would return one structure with the minor # for the
whole device; a multiport serial card would return the major/minor for
each callout device; etc. Apart from implementation details like
kdev_t versus major/minor #'s, this might be a useful model.
-- Dave Hinds
-
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/