aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/device.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index ade10dd6b779..b473f4278910 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -142,6 +142,7 @@ struct class {
142 142
143 struct subsystem subsys; 143 struct subsystem subsys;
144 struct list_head children; 144 struct list_head children;
145 struct list_head devices;
145 struct list_head interfaces; 146 struct list_head interfaces;
146 struct semaphore sem; /* locks both the children and interfaces lists */ 147 struct semaphore sem; /* locks both the children and interfaces lists */
147 148
@@ -305,6 +306,7 @@ struct device {
305 struct kobject kobj; 306 struct kobject kobj;
306 char bus_id[BUS_ID_SIZE]; /* position on parent bus */ 307 char bus_id[BUS_ID_SIZE]; /* position on parent bus */
307 struct device_attribute uevent_attr; 308 struct device_attribute uevent_attr;
309 struct device_attribute *devt_attr;
308 310
309 struct semaphore sem; /* semaphore to synchronize calls to 311 struct semaphore sem; /* semaphore to synchronize calls to
310 * its driver. 312 * its driver.
@@ -332,6 +334,11 @@ struct device {
332 struct dma_coherent_mem *dma_mem; /* internal for coherent mem 334 struct dma_coherent_mem *dma_mem; /* internal for coherent mem
333 override */ 335 override */
334 336
337 /* class_device migration path */
338 struct list_head node;
339 struct class *class; /* optional*/
340 dev_t devt; /* dev_t, creates the sysfs "dev" */
341
335 void (*release)(struct device * dev); 342 void (*release)(struct device * dev);
336}; 343};
337 344
@@ -373,6 +380,13 @@ extern int device_attach(struct device * dev);
373extern void driver_attach(struct device_driver * drv); 380extern void driver_attach(struct device_driver * drv);
374extern void device_reprobe(struct device *dev); 381extern void device_reprobe(struct device *dev);
375 382
383/*
384 * Easy functions for dynamically creating devices on the fly
385 */
386extern struct device *device_create(struct class *cls, struct device *parent,
387 dev_t devt, char *fmt, ...)
388 __attribute__((format(printf,4,5)));
389extern void device_destroy(struct class *cls, dev_t devt);
376 390
377/* 391/*
378 * Platform "fixup" functions - allow the platform to have their say 392 * Platform "fixup" functions - allow the platform to have their say