aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index f44247fe8135..5ca1cdba563a 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -126,6 +126,7 @@ struct device_driver {
126 struct klist_node knode_bus; 126 struct klist_node knode_bus;
127 127
128 struct module * owner; 128 struct module * owner;
129 const char * mod_name; /* used for built-in modules */
129 130
130 int (*probe) (struct device * dev); 131 int (*probe) (struct device * dev);
131 int (*remove) (struct device * dev); 132 int (*remove) (struct device * dev);
@@ -327,6 +328,13 @@ extern struct class_device *class_device_create(struct class *cls,
327 __attribute__((format(printf,5,6))); 328 __attribute__((format(printf,5,6)));
328extern void class_device_destroy(struct class *cls, dev_t devt); 329extern void class_device_destroy(struct class *cls, dev_t devt);
329 330
331struct device_type {
332 struct device_attribute *attrs;
333 int (*uevent)(struct device *dev, char **envp, int num_envp,
334 char *buffer, int buffer_size);
335 void (*release)(struct device *dev);
336};
337
330/* interface for exporting device attributes */ 338/* interface for exporting device attributes */
331struct device_attribute { 339struct device_attribute {
332 struct attribute attr; 340 struct attribute attr;
@@ -355,6 +363,7 @@ struct device {
355 363
356 struct kobject kobj; 364 struct kobject kobj;
357 char bus_id[BUS_ID_SIZE]; /* position on parent bus */ 365 char bus_id[BUS_ID_SIZE]; /* position on parent bus */
366 struct device_type *type;
358 unsigned is_registered:1; 367 unsigned is_registered:1;
359 struct device_attribute uevent_attr; 368 struct device_attribute uevent_attr;
360 struct device_attribute *devt_attr; 369 struct device_attribute *devt_attr;
@@ -390,9 +399,10 @@ struct device {
390 399
391 /* class_device migration path */ 400 /* class_device migration path */
392 struct list_head node; 401 struct list_head node;
393 struct class *class; /* optional*/ 402 struct class *class;
394 dev_t devt; /* dev_t, creates the sysfs "dev" */ 403 dev_t devt; /* dev_t, creates the sysfs "dev" */
395 struct attribute_group **groups; /* optional groups */ 404 struct attribute_group **groups; /* optional groups */
405 int uevent_suppress;
396 406
397 void (*release)(struct device * dev); 407 void (*release)(struct device * dev);
398}; 408};