With devfs this is really clean. A driver can allocate an instance
structure at probe time, and pass the pointer to devfs_register().
When the device node is opened, file->private_data is initialised with
that pointer. So the driver open() method already has a handle to the
device instance structure, without any lookups being required.
If you have a group of devices which are related (i.e. one card,
several device nodes, separate card has a different "group"), each
instance structure can have a pointer to the "parent" group instance
structure (one per card, for example). No mess, no fuss. Much easier
to grok than the old scheme.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
Please read the FAQ at http://www.tux.org/lkml/