diff options
| author | Patrick Mochel <mochel@osdl.org> | 2002-12-03 00:40:21 -0600 |
|---|---|---|
| committer | Patrick Mochel <mochel@osdl.org> | 2002-12-03 00:40:21 -0600 |
| commit | 6f614c99601d8d5f2b67a186806bbd21e5108fc5 (patch) | |
| tree | c46c20e1fa8a221b6032fdcf7fcee628952c39e7 /include/linux | |
| parent | 94d24994e77e724d8e27e44c36e3d0877cf7222d (diff) | |
driver model: clean up interface handling.
- Make sure devices are added to an interface if the interface is registered
e.g. as a module.
- Make sure interface data descriptors are inserted into the interface's list
by adding a kobject to them and calling kobject_register.
- Create interface_remove_data() for explicit removal of data descriptor.
- Break common pieces into separate functions.
- Add lots of comments.
- Add class_list to struct device, so we can access the devices registered
with the class.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/device.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index c1918942c4cd..48612267bd65 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -168,6 +168,7 @@ struct device_class { struct subsystem devsubsys; struct subsystem drvsubsys; struct list_head drivers; + struct list_head devices; int (*add_device)(struct device *); void (*remove_device)(struct device *); @@ -216,9 +217,7 @@ struct device_interface { char * name; struct device_class * devclass; - struct kobject kobj; - struct list_head devices; - + struct subsystem subsys; u32 devnum; int (*add_device) (struct device *); @@ -239,10 +238,11 @@ extern void interface_unregister(struct device_interface *); * and create a driverfs symlink for it. */ struct intf_data { - struct list_head node; struct device_interface * intf; struct device * dev; u32 intf_num; + struct list_head dev_entry; + struct kobject kobj; }; extern int interface_add_data(struct intf_data *); @@ -252,6 +252,7 @@ extern int interface_add_data(struct intf_data *); struct device { struct list_head node; /* node in sibling list */ struct list_head bus_list; /* node in bus's list */ + struct list_head class_list; struct list_head driver_list; struct list_head children; struct list_head intf_list; |
