diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2004-01-19 00:33:14 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2004-01-19 00:33:14 -0800 |
| commit | 7ad25aef21b02b215890bbe952fe23680df7e54a (patch) | |
| tree | 4e32faee4be990a58629c30014cc2cbe0fdfc877 /include/linux | |
| parent | 73009dd485707254f4ae4a59f242fa3e796041cb (diff) | |
[PATCH] Driver Core: add class_simple support
This patch adds a struct class_simple which can be used to create
"simple" class support for subsystems.
It also adds a class_release() callback for struct class, as it is
needed to properly handle the reference counting logic.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/device.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 490096618f63..367b21888ad4 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -46,6 +46,7 @@ struct device; struct device_driver; struct class; struct class_device; +struct class_simple; struct bus_type { char * name; @@ -155,6 +156,7 @@ struct class { int num_envp, char *buffer, int buffer_size); void (*release)(struct class_device *dev); + void (*class_release)(struct class *class); }; extern int class_register(struct class *); @@ -246,6 +248,13 @@ struct class_interface { extern int class_interface_register(struct class_interface *); extern void class_interface_unregister(struct class_interface *); +/* interface for class simple stuff */ +extern struct class_simple *class_simple_create(struct module *owner, char *name); +extern void class_simple_destroy(struct class_simple *cs); +extern struct class_device *class_simple_device_add(struct class_simple *cs, dev_t dev, struct device *device, const char *fmt, ...) + __attribute__((format(printf,4,5))); +extern void class_simple_device_remove(dev_t dev); + struct device { struct list_head node; /* node in sibling list */ |
