aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-06-28 19:19:58 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-26 00:08:38 -0400
commit2620efef7029bb040430f50f0fc148f2d5e002ad (patch)
tree433b19e18c40f6972ac0c936b844c997644dc176 /include/linux/device.h
parent64bb5d2c116478dba7501d2acf078ed74ba30c1f (diff)
Driver core: add ability for classes to handle devices properly
This adds two new callbacks to the class structure: int (*dev_uevent)(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size); void (*dev_release)(struct device *dev); And one pointer: struct device_attribute * dev_attrs; which all corrispond with the same thing as the "normal" class devices do, yet this is for when a struct device is bound to a class. Someday soon, struct class_device will go away, and then the other fields in this structure can be removed too. But this is necessary in order to get the transition to work properly. Tested out on a network core patch that converted it to use struct device instead of struct class_device. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 994d3ebd53f4..3122bd25ce42 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -151,12 +151,16 @@ struct class {
151 151
152 struct class_attribute * class_attrs; 152 struct class_attribute * class_attrs;
153 struct class_device_attribute * class_dev_attrs; 153 struct class_device_attribute * class_dev_attrs;
154 struct device_attribute * dev_attrs;
154 155
155 int (*uevent)(struct class_device *dev, char **envp, 156 int (*uevent)(struct class_device *dev, char **envp,
156 int num_envp, char *buffer, int buffer_size); 157 int num_envp, char *buffer, int buffer_size);
158 int (*dev_uevent)(struct device *dev, char **envp, int num_envp,
159 char *buffer, int buffer_size);
157 160
158 void (*release)(struct class_device *dev); 161 void (*release)(struct class_device *dev);
159 void (*class_release)(struct class *class); 162 void (*class_release)(struct class *class);
163 void (*dev_release)(struct device *dev);
160 164
161 int (*suspend)(struct device *, pm_message_t state); 165 int (*suspend)(struct device *, pm_message_t state);
162 int (*resume)(struct device *); 166 int (*resume)(struct device *);