summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authormochel@digitalimplant.org2005-03-21 19:59:56 +0100
committerGreg Kroah-Hartman2005-06-21 00:15:13 +0200
commitfae3cd00255e3e51ffd59fedb1bdb91ec96be395 (patch)
tree59e56a65f4b01f496436bd9b0720737ce1937db4 /include/linux/device.h
parent[PATCH] Move device/driver code to drivers/base/dd.c (diff)
downloadkernel-qcow2-linux-fae3cd00255e3e51ffd59fedb1bdb91ec96be395.tar.gz
kernel-qcow2-linux-fae3cd00255e3e51ffd59fedb1bdb91ec96be395.tar.xz
kernel-qcow2-linux-fae3cd00255e3e51ffd59fedb1bdb91ec96be395.zip
[PATCH] Add driver_for_each_device().
Now there's an iterator for accessing each device bound to a driver. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: linux-2.6.12-rc2/drivers/base/driver.c ===================================================================
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 195b327f3e19..10f5aa20e041 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -136,6 +136,9 @@ struct driver_attribute driver_attr_##_name = __ATTR(_name,_mode,_show,_store)
extern int driver_create_file(struct device_driver *, struct driver_attribute *);
extern void driver_remove_file(struct device_driver *, struct driver_attribute *);
+extern int driver_for_each_device(struct device_driver * drv, struct device * start,
+ void * data, int (*fn)(struct device *, void *));
+
/*
* device classes