driverfs updates, part 2

From: Patrick Mochel (mochel@osdl.org)
Date: Thu Jul 18 2002 - 20:28:17 EST


Ok, here is the next round of driverfs updates.

Short summary:

- move device and driver interface to driverfs into drivers/base/fs/*.c
- Implement bus_{create,remove}_file and driver_{create,remove}_file to
  give people an interface to create files those object types in their
  respective directories.

  driver_{create,remove}_file are the simplest, and exist in
  drivers/base/fs/driver.c. If people are feeling frisky, and want to
  play, use that as an example on how to extend driverfs for other
  subsystems and object types.

  I'm also attaching an example 'subsystem' driver that exports
  registration and unregistration functions that do creation and teardown
  of driverfs directories.

- Remove references to struct device in driverfs, making it completely
  independent of the device model core.

- Update documentation

        -pat

Please pull from

        bk://ldm.bkbits.net/linux-2.5-driverfs-2

Note that this tree includes all the changes that I posted earlier today.
bk://ldm.bkbits.net/linux-2.5-driverfs still exists, with only the earlier
changes.

This will update the following files:

 drivers/base/fs.c | 216 ----------------
 Documentation/filesystems/driverfs.txt | 443 ++++++++++++++++++++++++---------
 drivers/base/Makefile | 6
 drivers/base/base.h | 7
 drivers/base/bus.c | 74 -----
 drivers/base/driver.c | 23 -
 drivers/base/fs/Makefile | 18 -
 drivers/base/fs/bus.c | 199 ++++++++++----
 drivers/base/fs/device.c | 145 ++++++++--
 drivers/base/fs/driver.c | 48 +++
 drivers/base/fs/fs.h | 7
 drivers/base/fs/lib.c | 352 ++++++++++++++++++--------
 fs/driverfs/inode.c | 19 -
 fs/driverfs/lib.c | 28 +-
 include/linux/device.h | 5
 include/linux/driverfs_fs.h | 2
 16 files changed, 938 insertions(+), 654 deletions(-)

through these ChangeSets:

<mochel@osdl.org> (02/07/18 1.755)
   Update driverfs documentation

<mochel@osdl.org> (02/07/18 1.754)
   driverfs:
   Remove all struct device references.
   Don't touch device's reference count on open() and close()

<mochel@osdl.org> (02/07/18 1.753)
   add functions for creating/removing driverfs files for device drivers

<mochel@osdl.org> (02/07/18 1.752)
   bus driver driverfs interface:
   include fs.h
   fix compile error

<mochel@osdl.org> (02/07/18 1.751)
   Move driverfs directory creation for drivers to drivers/base/fs/driver.c

<mochel@osdl.org> (02/07/18 1.750)
   Add helpers make_one_dir and remove_one_dir for ease of creating and removing driverfs directories

<mochel@osdl.org> (02/07/18 1.749)
   fixup callers of driverfs_create_file to just pass template to it (and not do own duplication of the template)

<mochel@osdl.org> (02/07/18 1.748)
   driverfs:
   - make driverfs_create_file do duplication of driver_file_entry passed in (instead of making each caller do it)

<mochel@osdl.org> (02/07/18 1.747)
   Implement bus_{create,remove}_file, to allow creation of files for bus drivers in the bus's driverfs directory

<mochel@osdl.org> (02/07/18 1.746)
   Make root bus directory dynamically allocated, like the rest of the directories in the world...

<mochel@osdl.org> (02/07/18 1.745)
   Make sure mode is set when creating bus directory

<mochel@osdl.org> (02/07/18 1.744)
   Move functions for bus drivers interfacing with driverfs from drivers/base/bus.c to drivers/base/fs/bus.c

<mochel@osdl.org> (02/07/18 1.743)
   Move interface for creating driverfs files for devices from drivers/base/fs/lib.c to drivers/base/fs/device.c

<mochel@osdl.org> (02/07/18 1.742)
   Move drivers/base/fs.c to drivers/base/fs/lib.c

<mochel@osdl.org> (02/07/18 1.741)
   driverfs:
   - remove stray references to struct device



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:28 EST