summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-03-12 21:08:57 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 10:57:28 -0700
commit414264f959cf46f49f974b3510400e12ac3624a6 (patch)
treeead43994761620cbf7cb22525610627786562098 /include/linux/device.h
parent621a1672f7377e08a942f205d6742d8af1292aab (diff)
downloadop-kernel-dev-414264f959cf46f49f974b3510400e12ac3624a6.zip
op-kernel-dev-414264f959cf46f49f974b3510400e12ac3624a6.tar.gz
Driver core: add name to device_type
If "name" of a device_type is specified, the uevent will contain the device_type name in the DEVTYPE variable. This helps userspace to distingiush between different types of devices, belonging to the same subsystem. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 3b64fde..7f63d4d 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -331,7 +331,17 @@ extern struct class_device *class_device_create(struct class *cls,
__attribute__((format(printf,5,6)));
extern void class_device_destroy(struct class *cls, dev_t devt);
+/*
+ * The type of device, "struct device" is embedded in. A class
+ * or bus can contain devices of different types
+ * like "partitions" and "disks", "mouse" and "event".
+ * This identifies the device type and carries type-specific
+ * information, equivalent to the kobj_type of a kobject.
+ * If "name" is specified, the uevent will contain it in
+ * the DEVTYPE variable.
+ */
struct device_type {
+ const char *name;
struct attribute_group **groups;
int (*uevent)(struct device *dev, char **envp, int num_envp,
char *buffer, int buffer_size);
OpenPOWER on IntegriCloud