diff options
| author | Patrick Mochel <mochel@osdl.org> | 2002-10-29 02:26:01 -0800 |
|---|---|---|
| committer | Patrick Mochel <mochel@osdl.org> | 2002-10-29 02:26:01 -0800 |
| commit | eda520259938bd3299486f12ab5058c29dcd5326 (patch) | |
| tree | 781df420f8c878a106b3dcb4e305f1a938454d7e /include/linux/backing-dev.h | |
| parent | c637d6b116ae3cc7e143b99ea47f29d106c97d09 (diff) | |
sysfs: marry api with struct kobject.
This works on obviating the need for a separate data type to describe a sysfs
directory (which was renamed from struct driver_dir_entry to struct sysfs_dir).
All sysfs creation and removal functions now take a struct kobject, instead
of a struct sysfs_dir. This kobject is embedded in ->d_fsdata of the directory.
sysfs_create_dir() takes only 1 parameter now: the object that we're creating
the directory for. The parent dentry is derived by looking at the object's
parent.
sysfs_create_file() takes the object as the first parameter, and the attribute
as the second, which makes more sense from an API perspective.
sysfs_remove_file() now takes an attribute as a second parameter, to be
consistent with the creation function.
sysfs_remove_link() is created, which is basically the old sysfs_remove_file().
(symlinks don't have an attribute associated with them; only a name, which was
prohibiting the previous change).
open() and close() look for a kobject now, and do refcounting directly on the
object. Because of that, we don't need the ->open() and ->close() callbacks
in struct sysfs_ops, so they've been removed.
read() and write() also now look for a kobject now.
The comments have been updated, too.
Diffstat (limited to 'include/linux/backing-dev.h')
0 files changed, 0 insertions, 0 deletions
