From 6f2e53d5135a861d3ee8afdacac5cde13c49a05d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 27 Mar 2007 19:35:13 -0400 Subject: firewire: Use device->groups for adding device attributes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We dynamically create an attribute group for the key present on the device in hand and point device->group to it. This way the device core adds the sysfs attributes for us as the device is added. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-device.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/firewire/fw-device.h') diff --git a/drivers/firewire/fw-device.h b/drivers/firewire/fw-device.h index ce47ab95884..c167d59da68 100644 --- a/drivers/firewire/fw-device.h +++ b/drivers/firewire/fw-device.h @@ -32,6 +32,12 @@ enum fw_device_state { FW_DEVICE_SHUTDOWN, }; +struct fw_attribute_group { + struct attribute_group *groups[2]; + struct attribute_group group; + struct attribute *attrs[11]; +}; + struct fw_device { atomic_t state; struct fw_node *node; @@ -45,6 +51,7 @@ struct fw_device { size_t config_rom_length; int config_rom_retries; struct delayed_work work; + struct fw_attribute_group attribute_group; }; static inline struct fw_device * @@ -72,6 +79,7 @@ extern int fw_cdev_major; struct fw_unit { struct device device; u32 *directory; + struct fw_attribute_group attribute_group; }; static inline struct fw_unit * -- cgit v1.2.3