aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/device.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index e86a580b72e1..226e550ae2ea 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -213,7 +213,11 @@ struct class_device {
213 struct class_device_attribute uevent_attr; 213 struct class_device_attribute uevent_attr;
214 struct device * dev; /* not necessary, but nice to have */ 214 struct device * dev; /* not necessary, but nice to have */
215 void * class_data; /* class-specific data */ 215 void * class_data; /* class-specific data */
216 struct class_device *parent; /* parent of this child device, if there is one */
216 217
218 void (*release)(struct class_device *dev);
219 int (*hotplug)(struct class_device *dev, char **envp,
220 int num_envp, char *buffer, int buffer_size);
217 char class_id[BUS_ID_SIZE]; /* unique to this class */ 221 char class_id[BUS_ID_SIZE]; /* unique to this class */
218}; 222};
219 223
@@ -261,9 +265,12 @@ extern void class_interface_unregister(struct class_interface *);
261 265
262extern struct class *class_create(struct module *owner, char *name); 266extern struct class *class_create(struct module *owner, char *name);
263extern void class_destroy(struct class *cls); 267extern void class_destroy(struct class *cls);
264extern struct class_device *class_device_create(struct class *cls, dev_t devt, 268extern struct class_device *class_device_create(struct class *cls,
265 struct device *device, char *fmt, ...) 269 struct class_device *parent,
266 __attribute__((format(printf,4,5))); 270 dev_t devt,
271 struct device *device,
272 char *fmt, ...)
273 __attribute__((format(printf,5,6)));
267extern void class_device_destroy(struct class *cls, dev_t devt); 274extern void class_device_destroy(struct class *cls, dev_t devt);
268 275
269 276