]> git.neil.brown.name Git - history.git/commit
driverfs: Add struct attribute
authorPatrick Mochel <mochel@osdl.org>
Thu, 1 Aug 2002 04:17:11 +0000 (21:17 -0700)
committerPatrick Mochel <mochel@osdl.org>
Thu, 1 Aug 2002 04:17:11 +0000 (21:17 -0700)
commit9bb83ce6ec5908758f0999362c0297720ca9b5ac
treec7e9fe396199f9e46831f11715d36f6b1a1f93bd
parentb74d25762ecbcf83bd6bb869a6877754f2dd69e2
driverfs: Add struct attribute
driverfs can only handle passing struct device to read/write functions. In order to free it of this limitation,
we need a common data structure for driverfs to pass around.

The only thing that driverfs really needs are the name and mode of the file, which are now located in struct
attribute.

struct device_attribute gets a struct attribute member, which holds the name and mode. With the DEVICE_ATTR
macro, users of the structure require no modification.

device_create_file is modified to take a struct attribute parameter

a to_dev_attr() macro is introduced to convert between a struct attribute to a struct device_attribute
drivers/base/fs.c
fs/driverfs/inode.c
include/linux/driverfs_fs.h