[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] Add xenbus_for_each_[back, front]end functions to iterate each bus.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1184000991 -3600 # Node ID 729fa35e1e3b7b22c7115893afbda963e6408925 # Parent 21d5238ee2ec892825cc8905cc6ffa08b021fc88 Add xenbus_for_each_[back,front]end functions to iterate each bus. Signed-off-by: Kieran Mansley <kmansley@xxxxxxxxxxxxxx> --- drivers/xen/xenbus/xenbus_probe.c | 7 +++++++ drivers/xen/xenbus/xenbus_probe_backend.c | 7 +++++++ include/xen/xenbus.h | 3 +++ 3 files changed, 17 insertions(+) diff -r 21d5238ee2ec -r 729fa35e1e3b drivers/xen/xenbus/xenbus_probe.c --- a/drivers/xen/xenbus/xenbus_probe.c Mon Jul 09 18:07:34 2007 +0100 +++ b/drivers/xen/xenbus/xenbus_probe.c Mon Jul 09 18:09:51 2007 +0100 @@ -4,6 +4,7 @@ * Copyright (C) 2005 Rusty Russell, IBM Corporation * Copyright (C) 2005 Mike Wray, Hewlett-Packard * Copyright (C) 2005, 2006 XenSource Ltd + * Copyright (C) 2007 Solarflare Communications, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 @@ -1088,3 +1089,9 @@ static int __init boot_wait_for_devices( late_initcall(boot_wait_for_devices); #endif + +int xenbus_for_each_frontend(void *arg, int (*fn)(struct device *, void *)) +{ + return bus_for_each_dev(&xenbus_frontend.bus, NULL, arg, fn); +} +EXPORT_SYMBOL_GPL(xenbus_for_each_frontend); diff -r 21d5238ee2ec -r 729fa35e1e3b drivers/xen/xenbus/xenbus_probe_backend.c --- a/drivers/xen/xenbus/xenbus_probe_backend.c Mon Jul 09 18:07:34 2007 +0100 +++ b/drivers/xen/xenbus/xenbus_probe_backend.c Mon Jul 09 18:09:51 2007 +0100 @@ -4,6 +4,7 @@ * Copyright (C) 2005 Rusty Russell, IBM Corporation * Copyright (C) 2005 Mike Wray, Hewlett-Packard * Copyright (C) 2005, 2006 XenSource Ltd + * Copyright (C) 2007 Solarflare Communications, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 @@ -285,3 +286,9 @@ void xenbus_backend_device_register(void xenbus_backend.error); } } + +int xenbus_for_each_backend(void *arg, int (*fn)(struct device *, void *)) +{ + return bus_for_each_dev(&xenbus_backend.bus, NULL, arg, fn); +} +EXPORT_SYMBOL_GPL(xenbus_for_each_backend); diff -r 21d5238ee2ec -r 729fa35e1e3b include/xen/xenbus.h --- a/include/xen/xenbus.h Mon Jul 09 18:07:34 2007 +0100 +++ b/include/xen/xenbus.h Mon Jul 09 18:09:51 2007 +0100 @@ -300,4 +300,7 @@ int xenbus_dev_is_online(struct xenbus_d int xenbus_dev_is_online(struct xenbus_device *dev); int xenbus_frontend_closed(struct xenbus_device *dev); +int xenbus_for_each_backend(void *arg, int (*fn)(struct device *, void *)); +int xenbus_for_each_frontend(void *arg, int (*fn)(struct device *, void *)); + #endif /* _XEN_XENBUS_H */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |