diff options
| author | Patrick Mochel <mochel@digitalimplant.org> | 2004-06-02 20:41:29 -0700 |
|---|---|---|
| committer | Patrick Mochel <mochel@digitalimplant.org> | 2004-06-02 20:41:29 -0700 |
| commit | 0d1c76a044e8a7234267c11c8fc9661c5a8052c5 (patch) | |
| tree | e456d36d1a295bf14684f5e257d4713cc7a7f29a /include/linux/device.h | |
| parent | e33617a4edef44f60a169cb261bd25781341945f (diff) | |
[Driver Model] Add default attributes for classes class devices.
- add struct class::class_attrs, which is designed to point to an
array of class_attributes that are added when the class is registered
and removed when the class is unregistered.
This allows for more consolidated and cleaner definition of and
management of attributes.
- Add struct class::class_dev_attrs to do something similarly for
class devices. Each class device that is registered with the class
gets that set of attributes added for them, and subsequently removed
when the device is unregistered.
Each array depends on a terminating attribute with a NULL name. Hint:
use the new __ATTR_NULL macro to terminate it.
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index e125402c948e..f7c2f70c34aa 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -143,6 +143,9 @@ struct class { struct list_head children; struct list_head interfaces; + struct class_attribute * class_attrs; + struct class_device_attribute * class_dev_attrs; + int (*hotplug)(struct class_device *dev, char **envp, int num_envp, char *buffer, int buffer_size); |
